Skip to content

create_trust_store

create_trust_store(
    *,
    config_overrides: Optional[ElasticLoadBalancingv2ClientConfig] = None,
    name: Optional[TrustStoreName] = None,
    ca_certificates_bundle_s3_bucket: Optional[S3Bucket] = None,
    ca_certificates_bundle_s3_key: Optional[S3Key] = None,
    ca_certificates_bundle_s3_object_version: Optional[S3ObjectVersion] = None,
    tags: Optional[TagList] = None,
) -> CreateTrustStoreOutput

Creates a trust store.

For more information, see Mutual TLS for Application Load Balancers.

Parameters:

  • name (Optional[TrustStoreName], default: None ) –

    The name of the trust store.

    This name must be unique per region and can't be changed after creation.

  • ca_certificates_bundle_s3_bucket (Optional[S3Bucket], default: None ) –

    The Amazon S3 bucket for the ca certificates bundle.

  • ca_certificates_bundle_s3_key (Optional[S3Key], default: None ) –

    The Amazon S3 path for the ca certificates bundle.

  • ca_certificates_bundle_s3_object_version (Optional[S3ObjectVersion], default: None ) –

    The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.

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

    The tags to assign to the trust store.

Raises:

Source code in docs_src/capo_elastic_load_balancing_v2/_services/elastic_load_balancingv2.py
def create_trust_store(
    self,
    *,
    config_overrides: Optional[ElasticLoadBalancingv2ClientConfig] = None,
    name: Optional[
        "capo_elastic_load_balancing_v2.types.trust_store_name.TrustStoreName"
    ] = None,
    ca_certificates_bundle_s3_bucket: Optional[
        "capo_elastic_load_balancing_v2.types.s3_bucket.S3Bucket"
    ] = None,
    ca_certificates_bundle_s3_key: Optional[
        "capo_elastic_load_balancing_v2.types.s3_key.S3Key"
    ] = None,
    ca_certificates_bundle_s3_object_version: Optional[
        "capo_elastic_load_balancing_v2.types.s3_object_version.S3ObjectVersion"
    ] = None,
    tags: Optional["capo_elastic_load_balancing_v2.types.tag_list.TagList"] = None,
) -> "capo_elastic_load_balancing_v2.types.create_trust_store_output.CreateTrustStoreOutput":
    """<p>Creates a trust store.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/elasticloadbalancing/latest/application/mutual-authentication.html">Mutual TLS for Application Load Balancers</a>.</p>

    Args:
        name: <p>The name of the trust store.</p> <p>This name must be unique per region and can't be changed after creation.</p>
        ca_certificates_bundle_s3_bucket: <p>The Amazon S3 bucket for the ca certificates bundle.</p>
        ca_certificates_bundle_s3_key: <p>The Amazon S3 path for the ca certificates bundle.</p>
        ca_certificates_bundle_s3_object_version: <p>The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.</p>
        tags: <p>The tags to assign to the trust store.</p>

    Raises:
        capo_elastic_load_balancing_v2.errors.ca_certificates_bundle_not_found_exception.CaCertificatesBundleNotFoundException: <p>The specified ca certificate bundle does not exist.</p>
        capo_elastic_load_balancing_v2.errors.duplicate_tag_keys_exception.DuplicateTagKeysException: <p>A tag key was specified more than once.</p>
        capo_elastic_load_balancing_v2.errors.duplicate_trust_store_name_exception.DuplicateTrustStoreNameException: <p>A trust store with the specified name already exists.</p>
        capo_elastic_load_balancing_v2.errors.invalid_ca_certificates_bundle_exception.InvalidCaCertificatesBundleException: <p>The specified ca certificate bundle is in an invalid format, or corrupt.</p>
        capo_elastic_load_balancing_v2.errors.too_many_tags_exception.TooManyTagsException: <p>You've reached the limit on the number of tags for this resource.</p>
        capo_elastic_load_balancing_v2.errors.too_many_trust_stores_exception.TooManyTrustStoresException: <p>You've reached the limit on the number of trust stores for your Amazon Web Services account.</p>
        capo_elastic_load_balancing_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elastic_load_balancing_v2.types.create_trust_store_input.CreateTrustStoreInput]",
    ) -> OperationResponse[
        "capo_elastic_load_balancing_v2.types.create_trust_store_output.CreateTrustStoreOutput"
    ]:
        import capo_elastic_load_balancing_v2._operations.elastic_load_balancing_v10.create_trust_store

        output, http_response = (
            capo_elastic_load_balancing_v2._operations.elastic_load_balancing_v10.create_trust_store.create_trust_store(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateTrustStore")
    )
    input_: capo_elastic_load_balancing_v2.types.create_trust_store_input.CreateTrustStoreInput = {}
    if name is not None:
        input_["name"] = name
    if ca_certificates_bundle_s3_bucket is not None:
        input_["ca_certificates_bundle_s3_bucket"] = (
            ca_certificates_bundle_s3_bucket
        )
    if ca_certificates_bundle_s3_key is not None:
        input_["ca_certificates_bundle_s3_key"] = ca_certificates_bundle_s3_key
    if ca_certificates_bundle_s3_object_version is not None:
        input_["ca_certificates_bundle_s3_object_version"] = (
            ca_certificates_bundle_s3_object_version
        )
    if tags is not None:
        input_["tags"] = tags

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