Skip to content

create_id_namespace_association async

create_id_namespace_association(
    membership_identifier: MembershipIdentifier,
    input_reference_config: IdNamespaceAssociationInputReferenceConfig,
    name: GenericResourceName,
    *,
    config_overrides: Optional[AsyncCleanRoomsClientConfig] = None,
    tags: Optional[TagMap] = None,
    description: Optional[ResourceDescription] = None,
    id_mapping_config: Optional[IdMappingConfig] = None,
) -> CreateIdNamespaceAssociationOutput

Creates an ID namespace association.

Parameters:

  • membership_identifier (MembershipIdentifier) –

    The unique identifier of the membership that contains the ID namespace association.

  • input_reference_config (IdNamespaceAssociationInputReferenceConfig) –

    The input reference configuration needed to create the ID namespace association.

  • tags (Optional[TagMap], default: None ) –

    An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.

  • name (GenericResourceName) –

    The name for the ID namespace association.

  • description (Optional[ResourceDescription], default: None ) –

    The description of the ID namespace association.

  • id_mapping_config (Optional[IdMappingConfig], default: None ) –

    The configuration settings for the ID mapping table.

Raises:

Source code in docs_src/capo_cleanrooms/_services/async_clean_rooms.py
async def create_id_namespace_association(
    self,
    membership_identifier: "capo_cleanrooms.types.membership_identifier.MembershipIdentifier",
    input_reference_config: "capo_cleanrooms.types.id_namespace_association_input_reference_config.IdNamespaceAssociationInputReferenceConfig",
    name: "capo_cleanrooms.types.generic_resource_name.GenericResourceName",
    *,
    config_overrides: Optional[AsyncCleanRoomsClientConfig] = None,
    tags: Optional["capo_cleanrooms.types.tag_map.TagMap"] = None,
    description: Optional[
        "capo_cleanrooms.types.resource_description.ResourceDescription"
    ] = None,
    id_mapping_config: Optional[
        "capo_cleanrooms.types.id_mapping_config.IdMappingConfig"
    ] = None,
) -> "capo_cleanrooms.types.create_id_namespace_association_output.CreateIdNamespaceAssociationOutput":
    """<p>Creates an ID namespace association.</p>

    Args:
        membership_identifier: <p>The unique identifier of the membership that contains the ID namespace association.</p>
        input_reference_config: <p>The input reference configuration needed to create the ID namespace association.</p>
        tags: <p>An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.</p>
        name: <p>The name for the ID namespace association.</p>
        description: <p>The description of the ID namespace association.</p>
        id_mapping_config: <p>The configuration settings for the ID mapping table.</p>

    Raises:
        capo_cleanrooms.errors.access_denied_exception.AccessDeniedException: <p>Caller does not have sufficient access to perform this action.</p>
        capo_cleanrooms.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_cleanrooms.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_cleanrooms.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_cleanrooms.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request denied because service quota has been exceeded.</p>
        capo_cleanrooms.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_cleanrooms.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints.</p>
        capo_cleanrooms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cleanrooms.types.create_id_namespace_association_input.CreateIdNamespaceAssociationInput]",
    ) -> AsyncOperationResponse[
        "capo_cleanrooms.types.create_id_namespace_association_output.CreateIdNamespaceAssociationOutput"
    ]:
        import capo_cleanrooms._operations.aws_bastion_control_plane_service_lambda.create_id_namespace_association

        (
            output,
            http_response,
        ) = await capo_cleanrooms._operations.aws_bastion_control_plane_service_lambda.create_id_namespace_association.async_create_id_namespace_association(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateIdNamespaceAssociation")
    )
    input_: capo_cleanrooms.types.create_id_namespace_association_input.CreateIdNamespaceAssociationInput = {
        "membership_identifier": membership_identifier,
        "input_reference_config": input_reference_config,
        "name": name,
    }
    if tags is not None:
        input_["tags"] = tags
    if description is not None:
        input_["description"] = description
    if id_mapping_config is not None:
        input_["id_mapping_config"] = id_mapping_config

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output