Skip to content

update_certificate async

update_certificate(
    certificate_id: CertificateId,
    *,
    config_overrides: Optional[AsyncTransferClientConfig] = None,
    active_date: Optional[CertDate] = None,
    inactive_date: Optional[CertDate] = None,
    description: Optional[Description] = None,
) -> UpdateCertificateResponse

Updates the active and inactive dates for a certificate.

Parameters:

  • certificate_id (CertificateId) –

    The identifier of the certificate object that you are updating.

  • active_date (Optional[CertDate], default: None ) –

    An optional date that specifies when the certificate becomes active. If you do not specify a value, ActiveDate takes the same value as NotBeforeDate, which is specified by the CA.

  • inactive_date (Optional[CertDate], default: None ) –

    An optional date that specifies when the certificate becomes inactive. If you do not specify a value, InactiveDate takes the same value as NotAfterDate, which is specified by the CA.

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

    A short description to help identify the certificate.

Raises:

Source code in docs_src/capo_transfer/_services/async_transfer.py
async def update_certificate(
    self,
    certificate_id: "capo_transfer.types.certificate_id.CertificateId",
    *,
    config_overrides: Optional[AsyncTransferClientConfig] = None,
    active_date: Optional["capo_transfer.types.cert_date.CertDate"] = None,
    inactive_date: Optional["capo_transfer.types.cert_date.CertDate"] = None,
    description: Optional["capo_transfer.types.description.Description"] = None,
) -> "capo_transfer.types.update_certificate_response.UpdateCertificateResponse":
    """<p>Updates the active and inactive dates for a certificate.</p>

    Args:
        certificate_id: <p>The identifier of the certificate object that you are updating.</p>
        active_date: <p>An optional date that specifies when the certificate becomes active. If you do not specify a value, <code>ActiveDate</code> takes the same value as <code>NotBeforeDate</code>, which is specified by the CA. </p>
        inactive_date: <p>An optional date that specifies when the certificate becomes inactive. If you do not specify a value, <code>InactiveDate</code> takes the same value as <code>NotAfterDate</code>, which is specified by the CA.</p>
        description: <p>A short description to help identify the certificate.</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_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_certificate_request.UpdateCertificateRequest]",
    ) -> AsyncOperationResponse[
        "capo_transfer.types.update_certificate_response.UpdateCertificateResponse"
    ]:
        import capo_transfer._operations.transfer_service.update_certificate

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateCertificate")
    )
    input_: capo_transfer.types.update_certificate_request.UpdateCertificateRequest = {
        "certificate_id": certificate_id
    }
    if active_date is not None:
        input_["active_date"] = active_date
    if inactive_date is not None:
        input_["inactive_date"] = inactive_date
    if description is not None:
        input_["description"] = description

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