Skip to content

update_connector async

update_connector(
    connector_id: ConnectorId,
    *,
    config_overrides: Optional[AsyncTransferClientConfig] = None,
    url: Optional[Url] = None,
    as2_config: Optional[As2ConnectorConfig] = None,
    access_role: Optional[Role] = None,
    logging_role: Optional[Role] = None,
    sftp_config: Optional[SftpConnectorConfig] = None,
    security_policy_name: Optional[ConnectorSecurityPolicyName] = None,
    egress_config: Optional[UpdateConnectorEgressConfig] = None,
    ip_address_type: Optional[ConnectorsIpAddressType] = None,
) -> UpdateConnectorResponse

Updates some of the parameters for an existing connector. Provide the ConnectorId for the connector that you want to update, along with the new values for the parameters to update.

Parameters:

  • connector_id (ConnectorId) –

    The unique identifier for the connector.

  • url (Optional[Url], default: None ) –

    The URL of the partner's AS2 or SFTP endpoint.

    When creating AS2 connectors or service-managed SFTP connectors (connectors without egress configuration), you must provide a URL to specify the remote server endpoint. For VPC Lattice type connectors, the URL must be null.

  • as2_config (Optional[As2ConnectorConfig], default: None ) –

    A structure that contains the parameters for an AS2 connector object.

  • access_role (Optional[Role], default: None ) –

    Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.

    For AS2 connectors

    With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer.

    If you are using Basic authentication for your AS2 connector, the access role requires the secretsmanager:GetSecretValue permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the kms:Decrypt permission for that key.

    For SFTP connectors

    Make sure that the access role provides read and write access to the parent directory of the file location that's used in the StartFileTransfer request. Additionally, make sure that the role provides secretsmanager:GetSecretValue permission to Secrets Manager.

  • logging_role (Optional[Role], default: None ) –

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.

  • sftp_config (Optional[SftpConnectorConfig], default: None ) –

    A structure that contains the parameters for an SFTP connector object.

  • security_policy_name (Optional[ConnectorSecurityPolicyName], default: None ) –

    Specifies the name of the security policy for the connector.

  • egress_config (Optional[UpdateConnectorEgressConfig], default: None ) –

    Updates the egress configuration for the connector, allowing you to modify how traffic is routed from the connector to the SFTP server. Changes to VPC configuration may require connector restart.

  • ip_address_type (Optional[ConnectorsIpAddressType], default: None ) –

    Specifies the IP address type for the connector's network connections. When set to IPV4, the connector uses IPv4 addresses only. When set to DUALSTACK, the connector supports both IPv4 and IPv6 addresses, with IPv6 preferred when available.

Raises:

Source code in docs_src/capo_transfer/_services/async_transfer.py
async def update_connector(
    self,
    connector_id: "capo_transfer.types.connector_id.ConnectorId",
    *,
    config_overrides: Optional[AsyncTransferClientConfig] = None,
    url: Optional["capo_transfer.types.url.Url"] = None,
    as2_config: Optional[
        "capo_transfer.types.as2_connector_config.As2ConnectorConfig"
    ] = None,
    access_role: Optional["capo_transfer.types.role.Role"] = None,
    logging_role: Optional["capo_transfer.types.role.Role"] = None,
    sftp_config: Optional[
        "capo_transfer.types.sftp_connector_config.SftpConnectorConfig"
    ] = None,
    security_policy_name: Optional[
        "capo_transfer.types.connector_security_policy_name.ConnectorSecurityPolicyName"
    ] = None,
    egress_config: Optional[
        "capo_transfer.types.update_connector_egress_config.UpdateConnectorEgressConfig"
    ] = None,
    ip_address_type: Optional[
        "capo_transfer.types.connectors_ip_address_type.ConnectorsIpAddressType"
    ] = None,
) -> "capo_transfer.types.update_connector_response.UpdateConnectorResponse":
    """<p>Updates some of the parameters for an existing connector. Provide the <code>ConnectorId</code> for the connector that you want to update, along with the new values for the parameters to update.</p>

    Args:
        connector_id: <p>The unique identifier for the connector.</p>
        url: <p>The URL of the partner's AS2 or SFTP endpoint.</p> <p>When creating AS2 connectors or service-managed SFTP connectors (connectors without egress configuration), you must provide a URL to specify the remote server endpoint. For VPC Lattice type connectors, the URL must be null.</p>
        as2_config: <p>A structure that contains the parameters for an AS2 connector object.</p>
        access_role: <p>Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use.</p> <p> <b>For AS2 connectors</b> </p> <p>With AS2, you can send files by calling <code>StartFileTransfer</code> and specifying the file paths in the request parameter, <code>SendFilePaths</code>. We use the file’s parent directory (for example, for <code>--send-file-paths /bucket/dir/file.txt</code>, parent directory is <code>/bucket/dir/</code>) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the <code>AccessRole</code> needs to provide read and write access to the parent directory of the file location used in the <code>StartFileTransfer</code> request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with <code>StartFileTransfer</code>.</p> <p>If you are using Basic authentication for your AS2 connector, the access role requires the <code>secretsmanager:GetSecretValue</code> permission for the secret. If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key in Secrets Manager, then the role also needs the <code>kms:Decrypt</code> permission for that key.</p> <p> <b>For SFTP connectors</b> </p> <p>Make sure that the access role provides read and write access to the parent directory of the file location that's used in the <code>StartFileTransfer</code> request. Additionally, make sure that the role provides <code>secretsmanager:GetSecretValue</code> permission to Secrets Manager.</p>
        logging_role: <p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that allows a connector to turn on CloudWatch logging for Amazon S3 events. When set, you can view connector activity in your CloudWatch logs.</p>
        sftp_config: <p>A structure that contains the parameters for an SFTP connector object.</p>
        security_policy_name: <p>Specifies the name of the security policy for the connector.</p>
        egress_config: <p>Updates the egress configuration for the connector, allowing you to modify how traffic is routed from the connector to the SFTP server. Changes to VPC configuration may require connector restart.</p>
        ip_address_type: <p>Specifies the IP address type for the connector's network connections. When set to <code>IPV4</code>, the connector uses IPv4 addresses only. When set to <code>DUALSTACK</code>, the connector supports both IPv4 and IPv6 addresses, with IPv6 preferred when available.</p>

    Raises:
        capo_transfer.errors.internal_service_error.InternalServiceError: <p>This exception is thrown when an error occurs in the Transfer Family service.</p>
        capo_transfer.errors.invalid_request_exception.InvalidRequestException: <p>This exception is thrown when the client submits a malformed request.</p>
        capo_transfer.errors.resource_exists_exception.ResourceExistsException: <p>The requested resource does not exist, or exists in a region other than the one specified for the command.</p>
        capo_transfer.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource is not found by the Amazon Web ServicesTransfer Family service.</p>
        capo_transfer.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed because the Amazon Web ServicesTransfer Family service is not available.</p>
        capo_transfer.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_transfer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_transfer.types.update_connector_request.UpdateConnectorRequest]",
    ) -> AsyncOperationResponse[
        "capo_transfer.types.update_connector_response.UpdateConnectorResponse"
    ]:
        import capo_transfer._operations.transfer_service.update_connector

        (
            output,
            http_response,
        ) = await capo_transfer._operations.transfer_service.update_connector.async_update_connector(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_transfer.types.update_connector_request.UpdateConnectorRequest",
    ) -> dict[str, Any]:
        import capo_transfer.types.update_connector_request

        return capo_transfer.types.update_connector_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdateConnector", redact_input=_redact_input),
    )
    input_: capo_transfer.types.update_connector_request.UpdateConnectorRequest = {
        "connector_id": connector_id
    }
    if url is not None:
        input_["url"] = url
    if as2_config is not None:
        input_["as2_config"] = as2_config
    if access_role is not None:
        input_["access_role"] = access_role
    if logging_role is not None:
        input_["logging_role"] = logging_role
    if sftp_config is not None:
        input_["sftp_config"] = sftp_config
    if security_policy_name is not None:
        input_["security_policy_name"] = security_policy_name
    if egress_config is not None:
        input_["egress_config"] = egress_config
    if ip_address_type is not None:
        input_["ip_address_type"] = ip_address_type

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