Skip to content

create_cloud_connector async

create_cloud_connector(
    display_name: DisplayName,
    role_arn: CloudConnectorIamRoleArn,
    configuration: CloudConnectorConfiguration,
    config_connector_arn: ConfigConnectorArn,
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    description: Optional[CloudConnectorDescription] = None,
    tags: Optional[TagList] = None,
) -> CreateCloudConnectorResult

Creates a cloud connector that establishes a connection between Systems Manager and a third-party cloud environment.

Parameters:

  • display_name (DisplayName) –

    A friendly name for the cloud connector.

  • role_arn (CloudConnectorIamRoleArn) –

    The Amazon Resource Name (ARN) of the IAM role that the cloud connector uses to communicate with the third-party cloud environment.

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

    A description for the cloud connector.

  • configuration (CloudConnectorConfiguration) –

    The configuration details for connecting to the third-party cloud environment.

  • config_connector_arn (ConfigConnectorArn) –

    The ARN of the Amazon Web Services Config connector associated with this cloud connector.

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

    Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.

Raises:

  • ConflictException –

    An error occurred because of a conflict with a concurrent request or the current state of the resource. Retry your request.

  • InternalServerError –

    An error occurred on the server side.

  • ServiceQuotaExceededException –

    The request exceeds the service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_ssm/_services/async_ssm.py
async def create_cloud_connector(
    self,
    display_name: "capo_ssm.types.display_name.DisplayName",
    role_arn: "capo_ssm.types.cloud_connector_iam_role_arn.CloudConnectorIamRoleArn",
    configuration: "capo_ssm.types.cloud_connector_configuration.CloudConnectorConfiguration",
    config_connector_arn: "capo_ssm.types.config_connector_arn.ConfigConnectorArn",
    *,
    config_overrides: Optional[AsyncSSMClientConfig] = None,
    description: Optional[
        "capo_ssm.types.cloud_connector_description.CloudConnectorDescription"
    ] = None,
    tags: Optional["capo_ssm.types.tag_list.TagList"] = None,
) -> "capo_ssm.types.create_cloud_connector_result.CreateCloudConnectorResult":
    """<p>Creates a cloud connector that establishes a connection between Systems Manager and a third-party cloud environment.</p>

    Args:
        display_name: <p>A friendly name for the cloud connector.</p>
        role_arn: <p>The Amazon Resource Name (ARN) of the IAM role that the cloud connector uses to communicate with the third-party cloud environment.</p>
        description: <p>A description for the cloud connector.</p>
        configuration: <p>The configuration details for connecting to the third-party cloud environment.</p>
        config_connector_arn: <p>The ARN of the Amazon Web Services Config connector associated with this cloud connector.</p>
        tags: <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.</p>

    Raises:
        capo_ssm.errors.conflict_exception.ConflictException: <p>An error occurred because of a conflict with a concurrent request or the current state of the resource. Retry your request.</p>
        capo_ssm.errors.internal_server_error.InternalServerError: <p>An error occurred on the server side.</p>
        capo_ssm.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds the service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your Amazon Web Services account.</p>
        capo_ssm.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm.types.create_cloud_connector_request.CreateCloudConnectorRequest]",
    ) -> AsyncOperationResponse[
        "capo_ssm.types.create_cloud_connector_result.CreateCloudConnectorResult"
    ]:
        import capo_ssm._operations.amazon_ssm.create_cloud_connector

        (
            output,
            http_response,
        ) = await capo_ssm._operations.amazon_ssm.create_cloud_connector.async_create_cloud_connector(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCloudConnector")
    )
    input_: capo_ssm.types.create_cloud_connector_request.CreateCloudConnectorRequest = {
        "display_name": display_name,
        "role_arn": role_arn,
        "configuration": configuration,
        "config_connector_arn": config_connector_arn,
    }
    if description is not None:
        input_["description"] = description
    if tags is not None:
        input_["tags"] = tags

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