Skip to content

create_trust_store

create_trust_store(
    certificate_list: CertificateList,
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    tags: Optional[TagList] = None,
    client_token: Optional[ClientToken] = None,
) -> CreateTrustStoreResponse

Creates a trust store that can be associated with a web portal. A trust store contains certificate authority (CA) certificates. Once associated with a web portal, the browser in a streaming session will recognize certificates that have been issued using any of the CAs in the trust store. If your organization has internal websites that use certificates issued by private CAs, you should add the private CA certificate to the trust store.

Parameters:

  • certificate_list (CertificateList) –

    A list of CA certificates to be added to the trust store.

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

    The tags to add to the trust store. A tag is a key-value pair.

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

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.

    If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.

Raises:

Source code in docs_src/capo_workspaces_web/_services/work_spaces_web.py
def create_trust_store(
    self,
    certificate_list: "capo_workspaces_web.types.certificate_list.CertificateList",
    *,
    config_overrides: Optional[WorkSpacesWebClientConfig] = None,
    tags: Optional["capo_workspaces_web.types.tag_list.TagList"] = None,
    client_token: Optional[
        "capo_workspaces_web.types.client_token.ClientToken"
    ] = None,
) -> (
    "capo_workspaces_web.types.create_trust_store_response.CreateTrustStoreResponse"
):
    """<p>Creates a trust store that can be associated with a web portal. A trust store contains certificate authority (CA) certificates. Once associated with a web portal, the browser in a streaming session will recognize certificates that have been issued using any of the CAs in the trust store. If your organization has internal websites that use certificates issued by private CAs, you should add the private CA certificate to the trust store. </p>

    Args:
        certificate_list: <p>A list of CA certificates to be added to the trust store.</p>
        tags: <p>The tags to add to the trust store. A tag is a key-value pair.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request. </p> <p>If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.</p>

    Raises:
        capo_workspaces_web.errors.access_denied_exception.AccessDeniedException: <p>Access is denied.</p>
        capo_workspaces_web.errors.conflict_exception.ConflictException: <p>There is a conflict.</p>
        capo_workspaces_web.errors.internal_server_exception.InternalServerException: <p>There is an internal server error.</p>
        capo_workspaces_web.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota has been exceeded.</p>
        capo_workspaces_web.errors.throttling_exception.ThrottlingException: <p>There is a throttling error.</p>
        capo_workspaces_web.errors.validation_exception.ValidationException: <p>There is a validation error.</p>
        capo_workspaces_web.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_workspaces_web.types.create_trust_store_request.CreateTrustStoreRequest]",
    ) -> OperationResponse[
        "capo_workspaces_web.types.create_trust_store_response.CreateTrustStoreResponse"
    ]:
        import capo_workspaces_web._operations.aws_ermine_control_plane_service.create_trust_store

        output, http_response = (
            capo_workspaces_web._operations.aws_ermine_control_plane_service.create_trust_store.create_trust_store(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_workspaces_web.types.create_trust_store_request.CreateTrustStoreRequest",
    ) -> dict[str, Any]:
        import capo_workspaces_web.types.create_trust_store_request

        return (
            capo_workspaces_web.types.create_trust_store_request.redact_sensitive(
                input_
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateTrustStore", redact_input=_redact_input),
    )
    input_: capo_workspaces_web.types.create_trust_store_request.CreateTrustStoreRequest = {
        "certificate_list": certificate_list
    }
    if tags is not None:
        input_["tags"] = tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output