Skip to content

create_sse_connect_transit_gateway_attachment async

create_sse_connect_transit_gateway_attachment(
    sse_connect_id: SseConnectId,
    transit_gateway_arn: TransitGatewayArn,
    *,
    config_overrides: Optional[AsyncNetworkManagerClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    tags: Optional[TagList] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateSseConnectTransitGatewayAttachmentResponse

Creates an attachment between an SSE connect and a transit gateway. The attachment is in the Region of the transit gateway, which doesn't need to be one of the Regions of the SSE connect. The SSE connect must be in the AVAILABLE state.

If another account owns the transit gateway, the attachment is in the PENDING_ATTACHMENT_ACCEPTANCE state until the transit gateway owner accepts it. You can't change the transit gateway of an attachment.

Parameters:

  • sse_connect_id (SseConnectId) –

    The ID of the SSE connect.

  • transit_gateway_arn (TransitGatewayArn) –

    The ARN of the transit gateway to attach.

  • dry_run (Optional[Boolean], default: None ) –

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is AccessDeniedException.

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

    The tags to apply to the attachment.

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

    A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token, the operation returns the result of the original request instead of creating another resource.

Raises:

Examples:

To attach a transit gateway to an SSE connect The following example creates an attachment between an SSE connect and a transit gateway in aa-example-1.

>>> await client.create_sse_connect_transit_gateway_attachment(sse_connect_id='sse-connect-1234567890abcdef0', transit_gateway_arn='arn:aws:ec2:aa-example-1:111122223333:transit-gateway/tgw-1234567890abcdef0')
Source code in docs_src/capo_networkmanager/_services/async_network_manager.py
async def create_sse_connect_transit_gateway_attachment(
    self,
    sse_connect_id: "capo_networkmanager.types.sse_connect_id.SseConnectId",
    transit_gateway_arn: "capo_networkmanager.types.transit_gateway_arn.TransitGatewayArn",
    *,
    config_overrides: Optional[AsyncNetworkManagerClientConfig] = None,
    dry_run: Optional["capo_networkmanager.types.boolean.Boolean"] = None,
    tags: Optional["capo_networkmanager.types.tag_list.TagList"] = None,
    client_token: Optional[
        "capo_networkmanager.types.client_token.ClientToken"
    ] = None,
) -> "capo_networkmanager.types.create_sse_connect_transit_gateway_attachment_response.CreateSseConnectTransitGatewayAttachmentResponse":
    """<p>Creates an attachment between an SSE connect and a transit gateway. The attachment is in the Region of the transit gateway, which doesn't need to be one of the Regions of the SSE connect. The SSE connect must be in the <code>AVAILABLE</code> state.</p> <p>If another account owns the transit gateway, the attachment is in the <code>PENDING_ATTACHMENT_ACCEPTANCE</code> state until the transit gateway owner accepts it. You can't change the transit gateway of an attachment.</p>

    Args:
        sse_connect_id: <p>The ID of the SSE connect.</p>
        transit_gateway_arn: <p>The ARN of the transit gateway to attach.</p>
        dry_run: <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>AccessDeniedException</code>.</p>
        tags: <p>The tags to apply to the attachment.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token, the operation returns the result of the original request instead of creating another resource.</p>

    Raises:
        capo_networkmanager.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_networkmanager.errors.conflict_exception.ConflictException: <p>There was a conflict processing the request. Updating or deleting the resource can cause an inconsistent state.</p>
        capo_networkmanager.errors.dry_run_operation.DryRunOperation: <p>You have the required permissions. You specified the <code>DryRun</code> parameter, so the request didn't run.</p>
        capo_networkmanager.errors.internal_server_exception.InternalServerException: <p>The request has failed due to an internal error.</p>
        capo_networkmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
        capo_networkmanager.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service limit was exceeded.</p>
        capo_networkmanager.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_networkmanager.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints.</p>
        capo_networkmanager.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To attach a transit gateway to an SSE connect
        The following example creates an attachment between an SSE connect and a transit gateway in aa-example-1.

        >>> await client.create_sse_connect_transit_gateway_attachment(sse_connect_id='sse-connect-1234567890abcdef0', transit_gateway_arn='arn:aws:ec2:aa-example-1:111122223333:transit-gateway/tgw-1234567890abcdef0')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_networkmanager.types.create_sse_connect_transit_gateway_attachment_request.CreateSseConnectTransitGatewayAttachmentRequest]",
    ) -> AsyncOperationResponse[
        "capo_networkmanager.types.create_sse_connect_transit_gateway_attachment_response.CreateSseConnectTransitGatewayAttachmentResponse"
    ]:
        import capo_networkmanager._operations.network_manager.create_sse_connect_transit_gateway_attachment

        (
            output,
            http_response,
        ) = await capo_networkmanager._operations.network_manager.create_sse_connect_transit_gateway_attachment.async_create_sse_connect_transit_gateway_attachment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateSseConnectTransitGatewayAttachment"),
    )
    input_: capo_networkmanager.types.create_sse_connect_transit_gateway_attachment_request.CreateSseConnectTransitGatewayAttachmentRequest = {
        "sse_connect_id": sse_connect_id,
        "transit_gateway_arn": transit_gateway_arn,
    }
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if tags is not None:
        input_["tags"] = tags
    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