Skip to content

CloudDirectoryClient#

Index > CloudDirectory > CloudDirectoryClient

Auto-generated documentation for CloudDirectory type annotations stubs module mypy-boto3-clouddirectory.

CloudDirectoryClient#

Type annotations and code completion for boto3.client("clouddirectory"). boto3 documentation

# CloudDirectoryClient usage example

from boto3.session import Session
from mypy_boto3_clouddirectory.client import CloudDirectoryClient

def get_clouddirectory_client() -> CloudDirectoryClient:
    return Session().client("clouddirectory")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("clouddirectory").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("clouddirectory")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.BatchWriteException,
    client.exceptions.CannotListParentOfRootException,
    client.exceptions.ClientError,
    client.exceptions.DirectoryAlreadyExistsException,
    client.exceptions.DirectoryDeletedException,
    client.exceptions.DirectoryNotDisabledException,
    client.exceptions.DirectoryNotEnabledException,
    client.exceptions.FacetAlreadyExistsException,
    client.exceptions.FacetInUseException,
    client.exceptions.FacetNotFoundException,
    client.exceptions.FacetValidationException,
    client.exceptions.IncompatibleSchemaException,
    client.exceptions.IndexedAttributeMissingException,
    client.exceptions.InternalServiceException,
    client.exceptions.InvalidArnException,
    client.exceptions.InvalidAttachmentException,
    client.exceptions.InvalidFacetUpdateException,
    client.exceptions.InvalidNextTokenException,
    client.exceptions.InvalidRuleException,
    client.exceptions.InvalidSchemaDocException,
    client.exceptions.InvalidTaggingRequestException,
    client.exceptions.LimitExceededException,
    client.exceptions.LinkNameAlreadyInUseException,
    client.exceptions.NotIndexException,
    client.exceptions.NotNodeException,
    client.exceptions.NotPolicyException,
    client.exceptions.ObjectAlreadyDetachedException,
    client.exceptions.ObjectNotDetachedException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.RetryableConflictException,
    client.exceptions.SchemaAlreadyExistsException,
    client.exceptions.SchemaAlreadyPublishedException,
    client.exceptions.StillContainsLinksException,
    client.exceptions.UnsupportedIndexTypeException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_clouddirectory.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

add_facet_to_object#

Adds a new Facet to an object.

Type annotations and code completion for boto3.client("clouddirectory").add_facet_to_object method. boto3 documentation

# add_facet_to_object method definition

def add_facet_to_object(
    self,
    *,
    DirectoryArn: str,
    SchemaFacet: SchemaFacetTypeDef,  # (1)
    ObjectReference: ObjectReferenceTypeDef,  # (2)
    ObjectAttributeList: Sequence[AttributeKeyAndValueTypeDef] = ...,  # (3)
) -> Dict[str, Any]:
    ...
  1. See SchemaFacetTypeDef
  2. See ObjectReferenceTypeDef
  3. See AttributeKeyAndValueTypeDef
# add_facet_to_object method usage example with argument unpacking

kwargs: AddFacetToObjectRequestRequestTypeDef = {  # (1)
    "DirectoryArn": ...,
    "SchemaFacet": ...,
    "ObjectReference": ...,
}

parent.add_facet_to_object(**kwargs)
  1. See AddFacetToObjectRequestRequestTypeDef

apply_schema#

Copies the input published schema, at the specified version, into the Directory with the same name and version as that of the published schema.

Type annotations and code completion for boto3.client("clouddirectory").apply_schema method. boto3 documentation

# apply_schema method definition

def apply_schema(
    self,
    *,
    PublishedSchemaArn: str,
    DirectoryArn: str,
) -> ApplySchemaResponseTypeDef:  # (1)
    ...
  1. See ApplySchemaResponseTypeDef
# apply_schema method usage example with argument unpacking

kwargs: ApplySchemaRequestRequestTypeDef = {  # (1)
    "PublishedSchemaArn": ...,
    "DirectoryArn": ...,
}

parent.apply_schema(**kwargs)
  1. See ApplySchemaRequestRequestTypeDef

attach_object#

Attaches an existing object to another object.

Type annotations and code completion for boto3.client("clouddirectory").attach_object method. boto3 documentation

# attach_object method definition

def attach_object(
    self,
    *,
    DirectoryArn: str,
    ParentReference: ObjectReferenceTypeDef,  # (1)
    ChildReference: ObjectReferenceTypeDef,  # (1)
    LinkName: str,
) -> AttachObjectResponseTypeDef:  # (3)
    ...
  1. See ObjectReferenceTypeDef
  2. See ObjectReferenceTypeDef
  3. See AttachObjectResponseTypeDef
# attach_object method usage example with argument unpacking

kwargs: AttachObjectRequestRequestTypeDef = {  # (1)
    "DirectoryArn": ...,
    "ParentReference": ...,
    "ChildReference": ...,
    "LinkName": ...,
}

parent.attach_object(**kwargs)
  1. See AttachObjectRequestRequestTypeDef

attach_policy#

Attaches a policy object to a regular object.

Type annotations and code completion for boto3.client("clouddirectory").attach_policy method. boto3 documentation

# attach_policy method definition

def attach_policy(
    self,
    *,
    DirectoryArn: str,
    PolicyReference: ObjectReferenceTypeDef,  # (1)
    ObjectReference: ObjectReferenceTypeDef,  # (1)
) -> Dict[str, Any]:
    ...
  1. See ObjectReferenceTypeDef
  2. See ObjectReferenceTypeDef
# attach_policy method usage example with argument unpacking

kwargs: AttachPolicyRequestRequestTypeDef = {  # (1)
    "DirectoryArn": ...,
    "PolicyReference": ...,
    "ObjectReference": ...,
}

parent.attach_policy(**kwargs)
  1. See AttachPolicyRequestRequestTypeDef

attach_to_index#

Attaches the specified object to the specified index.

Type annotations and code completion for boto3.client("clouddirectory").attach_to_index method. boto3 documentation

# attach_to_index method definition

def attach_to_index(
    self,
    *,
    DirectoryArn: str,
    IndexReference: ObjectReferenceTypeDef,  # (1)
    TargetReference: ObjectReferenceTypeDef,  # (1)
) -> AttachToIndexResponseTypeDef:  # (3)
    ...
  1. See ObjectReferenceTypeDef
  2. See ObjectReferenceTypeDef
  3. See AttachToIndexResponseTypeDef
# attach_to_index method usage example with argument unpacking

kwargs: AttachToIndexRequestRequestTypeDef = {  # (1)
    "DirectoryArn": ...,
    "IndexReference": ...,
    "TargetReference": ...,
}

parent.attach_to_index(**kwargs)
  1. See AttachToIndexRequestRequestTypeDef

Attaches a typed link to a specified source and target object.

Type annotations and code completion for boto3.client("clouddirectory").attach_typed_link method. boto3 documentation

# attach_typed_link method definition

def attach_typed_link(
    self,
    *,
    DirectoryArn: str,
    SourceObjectReference: ObjectReferenceTypeDef,  # (1)
    TargetObjectReference: ObjectReferenceTypeDef,  # (1)
    TypedLinkFacet: TypedLinkSchemaAndFacetNameTypeDef,  # (3)
    Attributes: Sequence[AttributeNameAndValueTypeDef],  # (4)
) -> AttachTypedLinkResponseTypeDef:  # (5)
    ...
  1. See ObjectReferenceTypeDef
  2. See ObjectReferenceTypeDef
  3. See TypedLinkSchemaAndFacetNameTypeDef
  4. See AttributeNameAndValueTypeDef
  5. See AttachTypedLinkResponseTypeDef
# attach_typed_link method usage example with argument unpacking

kwargs: AttachTypedLinkRequestRequestTypeDef = {  # (1)
    "DirectoryArn": ...,
    "SourceObjectReference": ...,
    "TargetObjectReference": ...,
    "TypedLinkFacet": ...,
    "Attributes": ...,
}

parent.attach_typed_link(**kwargs)
  1. See AttachTypedLinkRequestRequestTypeDef

batch_read#

Performs all the read operations in a batch.

Type annotations and code completion for boto3.client("clouddirectory").batch_read method. boto3 documentation

# batch_read method definition

def batch_read(
    self,
    *,
    DirectoryArn: str,
    Operations: Sequence[BatchReadOperationTypeDef],  # (1)
    ConsistencyLevel: ConsistencyLevelType = ...,  # (2)
) -> BatchReadResponseTypeDef:  # (3)
    ...
  1. See BatchReadOperationTypeDef
  2. See ConsistencyLevelType
  3. See BatchReadResponseTypeDef
# batch_read method usage example with argument unpacking

kwargs: BatchReadRequestRequestTypeDef = {  # (1)
    "DirectoryArn": ...,
    "Operations": ...,
}

parent.batch_read(**kwargs)
  1. See BatchReadRequestRequestTypeDef

batch_write#

Performs all the write operations in a batch.

Type annotations and code completion for boto3.client("clouddirectory").batch_write method. boto3 documentation

# batch_write method definition

def batch_write(
    self,
    *,
    DirectoryArn: str,
    Operations: Sequence[BatchWriteOperationTypeDef],  # (1)
) -> BatchWriteResponseTypeDef:  # (2)
    ...
  1. See BatchWriteOperationTypeDef
  2. See BatchWriteResponseTypeDef
# batch_write method usage example with argument unpacking

kwargs: BatchWriteRequestRequestTypeDef = {  # (1)
    "DirectoryArn": ...,
    "Operations": ...,
}

parent.batch_write(**kwargs)
  1. See BatchWriteRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("clouddirectory").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("clouddirectory").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_directory#

Creates a Directory by copying the published schema into the directory.

Type annotations and code completion for boto3.client("clouddirectory").create_directory method. boto3 documentation

# create_directory method definition

def create_directory(
    self,
    *,
    Name: str,
    SchemaArn: str,
) -> CreateDirectoryResponseTypeDef:  # (1)
    ...
  1. See