Skip to content

update_service async

update_service(
    service_identifier: ServiceIdentifier,
    *,
    config_overrides: Optional[AsyncVPCLatticeClientConfig] = None,
    certificate_arn: Optional[CertificateArn] = None,
    auth_type: Optional[AuthType] = None,
    idle_timeout_seconds: Optional[IdleTimeoutSeconds] = None,
) -> UpdateServiceResponse

Updates the specified service.

Parameters:

  • service_identifier (ServiceIdentifier) –

    The ID or ARN of the service.

  • certificate_arn (Optional[CertificateArn], default: None ) –

    The Amazon Resource Name (ARN) of the certificate.

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

    The type of IAM policy.

    • NONE: The resource does not use an IAM policy. This is the default.

    • AWS_IAM: The resource uses an IAM policy. When this type is used, auth is enabled and an auth policy is required.

  • idle_timeout_seconds (Optional[IdleTimeoutSeconds], default: None ) –

    The amount of time, in seconds, that a connection can remain idle (no data sent) before VPC Lattice closes it. The valid range is 60 to 600 seconds. If you don't specify a value, the default is 60 seconds. This setting does not change the maximum connection duration of 10 minutes; connections are still closed when they reach that limit.

Raises:

Source code in docs_src/capo_vpc_lattice/_services/async_vpc_lattice.py
async def update_service(
    self,
    service_identifier: "capo_vpc_lattice.types.service_identifier.ServiceIdentifier",
    *,
    config_overrides: Optional[AsyncVPCLatticeClientConfig] = None,
    certificate_arn: Optional[
        "capo_vpc_lattice.types.certificate_arn.CertificateArn"
    ] = None,
    auth_type: Optional["capo_vpc_lattice.types.auth_type.AuthType"] = None,
    idle_timeout_seconds: Optional[
        "capo_vpc_lattice.types.idle_timeout_seconds.IdleTimeoutSeconds"
    ] = None,
) -> "capo_vpc_lattice.types.update_service_response.UpdateServiceResponse":
    """<p>Updates the specified service.</p>

    Args:
        service_identifier: <p>The ID or ARN of the service.</p>
        certificate_arn: <p>The Amazon Resource Name (ARN) of the certificate.</p>
        auth_type: <p>The type of IAM policy.</p> <ul> <li> <p> <code>NONE</code>: The resource does not use an IAM policy. This is the default.</p> </li> <li> <p> <code>AWS_IAM</code>: The resource uses an IAM policy. When this type is used, auth is enabled and an auth policy is required.</p> </li> </ul>
        idle_timeout_seconds: <p>The amount of time, in seconds, that a connection can remain idle (no data sent) before VPC Lattice closes it. The valid range is 60 to 600 seconds. If you don't specify a value, the default is 60 seconds. This setting does not change the maximum connection duration of 10 minutes; connections are still closed when they reach that limit.</p>

    Raises:
        capo_vpc_lattice.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action.</p>
        capo_vpc_lattice.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Updating or deleting a resource can cause an inconsistent state.</p>
        capo_vpc_lattice.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred while processing the request.</p>
        capo_vpc_lattice.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist.</p>
        capo_vpc_lattice.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would cause a service quota to be exceeded.</p>
        capo_vpc_lattice.errors.throttling_exception.ThrottlingException: <p>The limit on the number of requests per second was exceeded.</p>
        capo_vpc_lattice.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_vpc_lattice.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_vpc_lattice.types.update_service_request.UpdateServiceRequest]",
    ) -> AsyncOperationResponse[
        "capo_vpc_lattice.types.update_service_response.UpdateServiceResponse"
    ]:
        import capo_vpc_lattice._operations.mercury_control_plane.update_service

        (
            output,
            http_response,
        ) = await capo_vpc_lattice._operations.mercury_control_plane.update_service.async_update_service(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateService")
    )
    input_: capo_vpc_lattice.types.update_service_request.UpdateServiceRequest = {
        "service_identifier": service_identifier
    }
    if certificate_arn is not None:
        input_["certificate_arn"] = certificate_arn
    if auth_type is not None:
        input_["auth_type"] = auth_type
    if idle_timeout_seconds is not None:
        input_["idle_timeout_seconds"] = idle_timeout_seconds

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