Amazon CloudDirectory

2017/05/30 - Amazon CloudDirectory - 10 new api methods

Changes  Cloud Directory has launched support for Typed Links, enabling customers to create object-to-object relationships that are not hierarchical in nature. Typed Links enable customers to quickly query for data along these relationships. Customers can also enforce referential integrity using Typed Links, ensuring data in use is not inadvertently deleted.

CreateTypedLinkFacet (new) Link ¶

Creates a TypedLinkFacet. For more information, see Typed link.

See also: AWS API Documentation

Request Syntax

client.create_typed_link_facet(
    SchemaArn='string',
    Facet={
        'Name': 'string',
        'Attributes': [
            {
                'Name': 'string',
                'Type': 'STRING'|'BINARY'|'BOOLEAN'|'NUMBER'|'DATETIME',
                'DefaultValue': {
                    'StringValue': 'string',
                    'BinaryValue': b'bytes',
                    'BooleanValue': True|False,
                    'NumberValue': 'string',
                    'DatetimeValue': datetime(2015, 1, 1)
                },
                'IsImmutable': True|False,
                'Rules': {
                    'string': {
                        'Type': 'BINARY_LENGTH'|'NUMBER_COMPARISON'|'STRING_FROM_SET'|'STRING_LENGTH',
                        'Parameters': {
                            'string': 'string'
                        }
                    }
                },
                'RequiredBehavior': 'REQUIRED_ALWAYS'|'NOT_REQUIRED'
            },
        ],
        'IdentityAttributeOrder': [
            'string',
        ]
    }
)
type SchemaArn

string

param SchemaArn

[REQUIRED]

The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

type Facet

dict

param Facet

[REQUIRED]

Facet structure that is associated with the typed link facet.

  • Name (string) -- [REQUIRED]

    The unique name of the typed link facet.

  • Attributes (list) -- [REQUIRED]

    An ordered set of attributes that are associate with the typed link. You can use typed link attributes when you need to represent the relationship between two objects or allow for quick filtering of incoming or outgoing typed links.

    • (dict) --

      A typed link attribute definition.

      • Name (string) -- [REQUIRED]

        The unique name of the typed link attribute.

      • Type (string) -- [REQUIRED]

        The type of the attribute.

      • DefaultValue (dict) --

        The default value of the attribute (if configured).

        • StringValue (string) --

          A string data value.

        • BinaryValue (bytes) --

          A binary data value.

        • BooleanValue (boolean) --

          A Boolean data value.

        • NumberValue (string) --

          A number data value.

        • DatetimeValue (datetime) --

          A date and time value.

      • IsImmutable (boolean) --

        Whether the attribute is mutable or not.

      • Rules (dict) --

        Validation rules that are attached to the attribute definition.

        • (string) --

          • (dict) --

            Contains an Amazon Resource Name (ARN) and parameters that are associated with the rule.

            • Type (string) --

              The type of attribute validation rule.

            • Parameters (dict) --

              The minimum and maximum parameters that are associated with the rule.

              • (string) --

                • (string) --

      • RequiredBehavior (string) -- [REQUIRED]

        The required behavior of the TypedLinkAttributeDefinition .

  • IdentityAttributeOrder (list) -- [REQUIRED]

    A range filter that you provide for multiple attributes. The ability to filter typed links considers the order that the attributes are defined on the typed link facet. When providing ranges to typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range. Filters are interpreted in the order of the attributes on the typed link facet, not the order in which they are supplied to any API calls.

    • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DeleteTypedLinkFacet (new) Link ¶

Deletes a TypedLinkFacet. For more information, see Typed link.

See also: AWS API Documentation

Request Syntax

client.delete_typed_link_facet(
    SchemaArn='string',
    Name='string'
)
type SchemaArn

string

param SchemaArn

[REQUIRED]

The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

type Name

string

param Name

[REQUIRED]

The unique name of the typed link facet.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateTypedLinkFacet (new) Link ¶

Updates a TypedLinkFacet. For more information, see Typed link.

See also: AWS API Documentation

Request Syntax

client.update_typed_link_facet(
    SchemaArn='string',
    Name='string',
    AttributeUpdates=[
        {
            'Attribute': {
                'Name': 'string',
                'Type': 'STRING'|'BINARY'|'BOOLEAN'|'NUMBER'|'DATETIME',
                'DefaultValue': {
                    'StringValue': 'string',
                    'BinaryValue': b'bytes',
                    'BooleanValue': True|False,
                    'NumberValue': 'string',
                    'DatetimeValue': datetime(2015, 1, 1)
                },
                'IsImmutable': True|False,
                'Rules': {
                    'string': {
                        'Type': 'BINARY_LENGTH'|'NUMBER_COMPARISON'|'STRING_FROM_SET'|'STRING_LENGTH',
                        'Parameters': {
                            'string': 'string'
                        }
                    }
                },
                'RequiredBehavior': 'REQUIRED_ALWAYS'|'NOT_REQUIRED'
            },
            'Action': 'CREATE_OR_UPDATE'|'DELETE'
        },
    ],
    IdentityAttributeOrder=[
        'string',
    ]
)
type SchemaArn

string

param SchemaArn

[REQUIRED]

The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

type Name

string

param Name

[REQUIRED]

The unique name of the typed link facet.

type AttributeUpdates

list

param AttributeUpdates

[REQUIRED]

Attributes update structure.

  • (dict) --

    A typed link facet attribute update.

    • Attribute (dict) -- [REQUIRED]

      The attribute to update.

      • Name (string) -- [REQUIRED]

        The unique name of the typed link attribute.

      • Type (string) -- [REQUIRED]

        The type of the attribute.

      • DefaultValue (dict) --

        The default value of the attribute (if configured).

        • StringValue (string) --

          A string data value.

        • BinaryValue (bytes) --

          A binary data value.

        • BooleanValue (boolean) --

          A Boolean data value.

        • NumberValue (string) --

          A number data value.

        • DatetimeValue (datetime) --

          A date and time value.

      • IsImmutable (boolean) --

        Whether the attribute is mutable or not.

      • Rules (dict) --

        Validation rules that are attached to the attribute definition.

        • (string) --

          • (dict) --

            Contains an Amazon Resource Name (ARN) and parameters that are associated with the rule.

            • Type (string) --

              The type of attribute validation rule.

            • Parameters (dict) --

              The minimum and maximum parameters that are associated with the rule.

              • (string) --

                • (string) --

      • RequiredBehavior (string) -- [REQUIRED]

        The required behavior of the TypedLinkAttributeDefinition .

    • Action (string) -- [REQUIRED]

      The action to perform when updating the attribute.

type IdentityAttributeOrder

list

param IdentityAttributeOrder

[REQUIRED]

A range filter that you provide for multiple attributes. The ability to filter typed links considers the order that the attributes are defined on the typed link facet. When providing ranges to a typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range. Filters are interpreted in the order of the attributes on the typed link facet, not the order in which they are supplied to any API calls.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

GetTypedLinkFacetInformation (new) Link ¶

Returns the identity attribute order for a specific TypedLinkFacet. For more information, see Typed link.

See also: AWS API Documentation

Request Syntax

client.get_typed_link_facet_information(
    SchemaArn='string',
    Name='string'
)
type SchemaArn

string

param SchemaArn

[REQUIRED]

The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

type Name

string

param Name

[REQUIRED]

The unique name of the typed link facet.

rtype

dict

returns

Response Syntax

{
    'IdentityAttributeOrder': [
        'string',
    ]
}

Response Structure

  • (dict) --

    • IdentityAttributeOrder (list) --

      A range filter that you provide for multiple attributes. The ability to filter typed links considers the order that the attributes are defined on the typed link facet. When providing ranges to typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range. Filters are interpreted in the order of the attributes on the typed link facet, not the order in which they are supplied to any API calls.

      • (string) --

ListTypedLinkFacetNames (new) Link ¶

Returns a paginated list of TypedLink facet names for a particular schema. For more information, see Typed link.

See also: AWS API Documentation

Request Syntax

client.list_typed_link_facet_names(
    SchemaArn='string',
    NextToken='string',
    MaxResults=123
)
type SchemaArn

string

param SchemaArn

[REQUIRED]

The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

type NextToken

string

param NextToken

The pagination token.

type MaxResults

integer

param MaxResults

The maximum number of results to retrieve.

rtype

dict

returns

Response Syntax

{
    'FacetNames': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • FacetNames (list) --

      The names of typed link facets that exist within the schema.

      • (string) --

    • NextToken (string) --

      The pagination token.

ListTypedLinkFacetAttributes (new) Link ¶

Returns a paginated list of all attribute definitions for a particular TypedLinkFacet. For more information, see Typed link.

See also: AWS API Documentation

Request Syntax

client.list_typed_link_facet_attributes(
    SchemaArn='string',
    Name='string',
    NextToken='string',
    MaxResults=123
)
type SchemaArn

string

param SchemaArn

[REQUIRED]

The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.

type Name

string

param Name

[REQUIRED]

The unique name of the typed link facet.

type NextToken

string

param NextToken

The pagination token.

type MaxResults

integer

param MaxResults

The maximum number of results to retrieve.

rtype

dict

returns

Response Syntax

{
    'Attributes': [
        {
            'Name': 'string',
            'Type': 'STRING'|'BINARY'|'BOOLEAN'|'NUMBER'|'DATETIME',
            'DefaultValue': {
                'StringValue': 'string',
                'BinaryValue': b'bytes',
                'BooleanValue': True|False,
                'NumberValue': 'string',
                'DatetimeValue': datetime(2015, 1, 1)
            },
            'IsImmutable': True|False,
            'Rules': {
                'string': {
                    'Type': 'BINARY_LENGTH'|'NUMBER_COMPARISON'|'STRING_FROM_SET'|'STRING_LENGTH',
                    'Parameters': {
                        'string': 'string'
                    }
                }
            },
            'RequiredBehavior': 'REQUIRED_ALWAYS'|'NOT_REQUIRED'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Attributes (list) --

      An ordered set of attributes associate with the typed link.

      • (dict) --

        A typed link attribute definition.

        • Name (string) --

          The unique name of the typed link attribute.

        • Type (string) --

          The type of the attribute.

        • DefaultValue (dict) --

          The default value of the attribute (if configured).

          • StringValue (string) --

            A string data value.

          • BinaryValue (bytes) --

            A binary data value.

          • BooleanValue (boolean) --

            A Boolean data value.

          • NumberValue (string) --

            A number data value.

          • DatetimeValue (datetime) --

            A date and time value.

        • IsImmutable (boolean) --

          Whether the attribute is mutable or not.

        • Rules (dict) --

          Validation rules that are attached to the attribute definition.

          • (string) --

            • (dict) --

              Contains an Amazon Resource Name (ARN) and parameters that are associated with the rule.

              • Type (string) --

                The type of attribute validation rule.

              • Parameters (dict) --

                The minimum and maximum parameters that are associated with the rule.

                • (string) --

                  • (string) --

        • RequiredBehavior (string) --

          The required behavior of the TypedLinkAttributeDefinition .

    • NextToken (string) --

      The pagination token.