Skip to content

create_connector_destination async

create_connector_destination(
    cloud_connector_id: CloudConnectorId,
    auth_config: AuthConfig,
    *,
    config_overrides: Optional[AsyncIoTManagedIntegrationsClientConfig] = None,
    name: Optional[ConnectorDestinationName] = None,
    description: Optional[ConnectorDestinationDescription] = None,
    auth_type: Optional[AuthType] = None,
    secrets_manager: Optional[SecretsManager] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateConnectorDestinationResponse

Create a connector destination for connecting a cloud-to-cloud (C2C) connector to the customer's Amazon Web Services account.

Parameters:

  • name (Optional[ConnectorDestinationName], default: None ) –

    The display name of the connector destination.

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

    A description of the connector destination.

  • cloud_connector_id (CloudConnectorId) –

    The identifier of the C2C connector.

  • auth_type (Optional[AuthType], default: None ) –

    The authentication type used for the connector destination, which determines how credentials and access are managed.

  • auth_config (AuthConfig) –

    The authentication configuration details for the connector destination, including OAuth settings and other authentication parameters.

  • secrets_manager (Optional[SecretsManager], default: None ) –

    The AWS Secrets Manager configuration used to securely store and manage sensitive information for the connector destination.

  • client_token (Optional[ClientToken], default: None ) –

    An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.

Raises:

Source code in docs_src/capo_iot_managed_integrations/_services/async_io_t_managed_integrations.py
async def create_connector_destination(
    self,
    cloud_connector_id: "capo_iot_managed_integrations.types.cloud_connector_id.CloudConnectorId",
    auth_config: "capo_iot_managed_integrations.types.auth_config.AuthConfig",
    *,
    config_overrides: Optional[AsyncIoTManagedIntegrationsClientConfig] = None,
    name: Optional[
        "capo_iot_managed_integrations.types.connector_destination_name.ConnectorDestinationName"
    ] = None,
    description: Optional[
        "capo_iot_managed_integrations.types.connector_destination_description.ConnectorDestinationDescription"
    ] = None,
    auth_type: Optional[
        "capo_iot_managed_integrations.types.auth_type.AuthType"
    ] = None,
    secrets_manager: Optional[
        "capo_iot_managed_integrations.types.secrets_manager.SecretsManager"
    ] = None,
    client_token: Optional[
        "capo_iot_managed_integrations.types.client_token.ClientToken"
    ] = None,
) -> "capo_iot_managed_integrations.types.create_connector_destination_response.CreateConnectorDestinationResponse":
    """<p>Create a connector destination for connecting a cloud-to-cloud (C2C) connector to the customer's Amazon Web Services account.</p>

    Args:
        name: <p>The display name of the connector destination.</p>
        description: <p>A description of the connector destination.</p>
        cloud_connector_id: <p>The identifier of the C2C connector.</p>
        auth_type: <p>The authentication type used for the connector destination, which determines how credentials and access are managed.</p>
        auth_config: <p>The authentication configuration details for the connector destination, including OAuth settings and other authentication parameters.</p>
        secrets_manager: <p>The AWS Secrets Manager configuration used to securely store and manage sensitive information for the connector destination.</p>
        client_token: <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>

    Raises:
        capo_iot_managed_integrations.errors.access_denied_exception.AccessDeniedException: <p>User is not authorized.</p>
        capo_iot_managed_integrations.errors.conflict_exception.ConflictException: <p>There is a conflict with the request.</p>
        capo_iot_managed_integrations.errors.internal_server_exception.InternalServerException: <p>Internal error from the service that indicates an unexpected error or that the service is unavailable.</p>
        capo_iot_managed_integrations.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource does not exist.</p>
        capo_iot_managed_integrations.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
        capo_iot_managed_integrations.errors.unauthorized_exception.UnauthorizedException: <p>You are not authorized to perform this operation.</p>
        capo_iot_managed_integrations.errors.validation_exception.ValidationException: <p>A validation error occurred when performing the API request.</p>
        capo_iot_managed_integrations.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_iot_managed_integrations.types.create_connector_destination_request.CreateConnectorDestinationRequest]",
    ) -> AsyncOperationResponse[
        "capo_iot_managed_integrations.types.create_connector_destination_response.CreateConnectorDestinationResponse"
    ]:
        import capo_iot_managed_integrations._operations.iot_managed_integrations.create_connector_destination

        (
            output,
            http_response,
        ) = await capo_iot_managed_integrations._operations.iot_managed_integrations.create_connector_destination.async_create_connector_destination(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateConnectorDestination")
    )
    input_: capo_iot_managed_integrations.types.create_connector_destination_request.CreateConnectorDestinationRequest = {
        "cloud_connector_id": cloud_connector_id,
        "auth_config": auth_config,
    }
    if name is not None:
        input_["name"] = name
    if description is not None:
        input_["description"] = description
    if auth_type is not None:
        input_["auth_type"] = auth_type
    if secrets_manager is not None:
        input_["secrets_manager"] = secrets_manager
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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