Skip to content

create_use_case

create_use_case(
    instance_id: InstanceId,
    integration_association_id: IntegrationAssociationId,
    use_case_type: UseCaseType,
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    tags: Optional[TagMap] = None,
) -> CreateUseCaseResponse

Creates a use case for an integration association.

Parameters:

  • instance_id (InstanceId) –

    The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • integration_association_id (IntegrationAssociationId) –

    The identifier for the integration association.

  • use_case_type (UseCaseType) –

    The type of use case to associate to the integration association. Each integration association can have only one of each use case type.

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

    The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.

Raises:

Source code in docs_src/capo_connect/_services/connect.py
def create_use_case(
    self,
    instance_id: "capo_connect.types.instance_id.InstanceId",
    integration_association_id: "capo_connect.types.integration_association_id.IntegrationAssociationId",
    use_case_type: "capo_connect.types.use_case_type.UseCaseType",
    *,
    config_overrides: Optional[ConnectClientConfig] = None,
    tags: Optional["capo_connect.types.tag_map.TagMap"] = None,
) -> "capo_connect.types.create_use_case_response.CreateUseCaseResponse":
    """<p>Creates a use case for an integration association.</p>

    Args:
        instance_id: <p>The identifier of the Connect Customer instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
        integration_association_id: <p>The identifier for the integration association.</p>
        use_case_type: <p>The type of use case to associate to the integration association. Each integration association can have only one of each use case type.</p>
        tags: <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>

    Raises:
        capo_connect.errors.duplicate_resource_exception.DuplicateResourceException: <p>A resource with the specified name already exists.</p>
        capo_connect.errors.internal_service_exception.InternalServiceException: <p>Request processing failed because of an error or failure with the service.</p>
        capo_connect.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid.</p>
        capo_connect.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_connect.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_connect.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_connect.types.create_use_case_request.CreateUseCaseRequest]",
    ) -> OperationResponse[
        "capo_connect.types.create_use_case_response.CreateUseCaseResponse"
    ]:
        import capo_connect._operations.amazon_connect_service.create_use_case

        output, http_response = (
            capo_connect._operations.amazon_connect_service.create_use_case.create_use_case(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateUseCase")
    )
    input_: capo_connect.types.create_use_case_request.CreateUseCaseRequest = {
        "instance_id": instance_id,
        "integration_association_id": integration_association_id,
        "use_case_type": use_case_type,
    }
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output