Exemplo n.º 1
0
    def from_stream_arn(
        cls,
        scope: constructs.Construct,
        id: builtins.str,
        stream_arn: builtins.str,
    ) -> IStream:
        """Import an existing Kinesis Stream provided an ARN.

        :param scope: The parent creating construct (usually ``this``).
        :param id: The construct's name.
        :param stream_arn: Stream ARN (i.e. arn:aws:kinesis:::stream/Foo).
        """
        return jsii.sinvoke(cls, "fromStreamArn", [scope, id, stream_arn])
Exemplo n.º 2
0
    def require_fact(cls, region: builtins.str,
                     name: builtins.str) -> builtins.str:
        """(experimental) Retrieve a fact from the Fact database.

        (retrieval will fail if the specified region or
        fact name does not exist.)

        :param region: the name of the region (e.g: ``us-east-1``).
        :param name: the name of the fact being looked up (see the ``FactName`` class for details).

        :stability: experimental
        """
        return jsii.sinvoke(cls, "requireFact", [region, name])
Exemplo n.º 3
0
    def from_profiling_group_name(
        cls,
        scope: constructs.Construct,
        id: builtins.str,
        profiling_group_name: builtins.str,
    ) -> IProfilingGroup:
        '''Import an existing Profiling Group provided a Profiling Group Name.

        :param scope: The parent creating construct.
        :param id: The construct's name.
        :param profiling_group_name: Profiling Group Name.
        '''
        return typing.cast(IProfilingGroup, jsii.sinvoke(cls, "fromProfilingGroupName", [scope, id, profiling_group_name]))
Exemplo n.º 4
0
    def find(cls, region: str, name: str) -> typing.Optional[str]:
        """Retrieves a fact from this Fact database.

        :param region: the name of the region (e.g: ``us-east-1``).
        :param name: the name of the fact being looked up (see the ``FactName`` class for details).

        return
        :return: the fact value if it is known, and ``undefined`` otherwise.

        stability
        :stability: experimental
        """
        return jsii.sinvoke(cls, "find", [region, name])
Exemplo n.º 5
0
    def register(
        cls,
        fact: "IFact",
        allow_replacing: typing.Optional[builtins.bool] = None,
    ) -> None:
        """(experimental) Registers a new fact in this Fact database.

        :param fact: the new fact to be registered.
        :param allow_replacing: whether new facts can replace existing facts or not.

        :stability: experimental
        """
        return jsii.sinvoke(cls, "register", [fact, allow_replacing])
Exemplo n.º 6
0
    def from_key_arn(cls, scope: aws_cdk.cdk.Construct, id: str,
                     key_arn: str) -> "IKey":
        """Import an externally defined KMS Key using its ARN.

        Arguments:
            scope: the construct that will "own" the imported key.
            id: the id of the imported key in the construct tree.
            keyArn: the ARN of an existing KMS key.

        Stability:
            experimental
        """
        return jsii.sinvoke(cls, "fromKeyArn", [scope, id, key_arn])
Exemplo n.º 7
0
    def from_dns(
        cls,
        hosted_zone: typing.Optional[aws_cdk.aws_route53.IHostedZone] = None
    ) -> "CertificateValidation":
        """Validate the certifcate with DNS.

        IMPORTANT: If ``hostedZone`` is not specified, DNS records must be added
        manually and the stack will not complete creating until the records are
        added.

        :param hosted_zone: the hosted zone where DNS records must be created.
        """
        return jsii.sinvoke(cls, "fromDns", [hosted_zone])
Exemplo n.º 8
0
    def from_alias_attributes(cls, scope: aws_cdk.core.Construct, id: str, *,
                              alias_name: str,
                              alias_target_key: "IKey") -> "IAlias":
        """
        :param scope: -
        :param id: -
        :param alias_name: 
        :param alias_target_key: 
        """
        attrs = AliasAttributes(alias_name=alias_name,
                                alias_target_key=alias_target_key)

        return jsii.sinvoke(cls, "fromAliasAttributes", [scope, id, attrs])
Exemplo n.º 9
0
    def method(cls,
               *,
               extra: typing.Optional[str] = None,
               prop: _SomeEnum_b2e41d92) -> bool:
        """
        :param extra: 
        :param prop: 

        stability
        :stability: experimental
        """
        props = _KwargsProps_c7855dcf(extra=extra, prop=prop)

        return jsii.sinvoke(cls, "method", [props])
Exemplo n.º 10
0
    def from_certificate_arn(cls, scope: aws_cdk.cdk.Construct, id: str,
                             certificate_arn: str) -> "ICertificate":
        """Import a certificate.

        Arguments:
            scope: -
            id: -
            certificateArn: -

        Stability:
            experimental
        """
        return jsii.sinvoke(cls, "fromCertificateArn",
                            [scope, id, certificate_arn])
Exemplo n.º 11
0
    def from_profiling_group_name(
            cls, scope: aws_cdk.core.Construct, id: str,
            profiling_group_name: str) -> "IProfilingGroup":
        """Import an existing Profiling Group provided a Profiling Group Name.

        :param scope: The parent creating construct.
        :param id: The construct's name.
        :param profiling_group_name: Profiling Group Name.

        stability
        :stability: experimental
        """
        return jsii.sinvoke(cls, "fromProfilingGroupName",
                            [scope, id, profiling_group_name])
Exemplo n.º 12
0
    def unregister(cls,
                   region: str,
                   name: str,
                   value: typing.Optional[str] = None) -> None:
        """Removes a fact from the database.

        :param region: the region for which the fact is to be removed.
        :param name: the name of the fact to remove.
        :param value: the value that should be removed (removal will fail if the value is specified, but does not match the current stored value).

        stability
        :stability: experimental
        """
        return jsii.sinvoke(cls, "unregister", [region, name, value])
Exemplo n.º 13
0
    def from_profiling_group_name(
        cls,
        scope: constructs.Construct,
        id: builtins.str,
        profiling_group_name: builtins.str,
    ) -> IProfilingGroup:
        """(experimental) Import an existing Profiling Group provided a Profiling Group Name.

        :param scope: The parent creating construct.
        :param id: The construct's name.
        :param profiling_group_name: Profiling Group Name.

        :stability: experimental
        """
        return jsii.sinvoke(cls, "fromProfilingGroupName",
                            [scope, id, profiling_group_name])
Exemplo n.º 14
0
    def service_principal(cls, service: str, region: str, url_suffix: str) -> str:
        """Computes a "standard" AWS Service principal for a given service, region and suffix.

        This is useful for example when
        you need to compute a service principal name, but you do not have a synthesize-time region literal available (so
        all you have is ``{ "Ref": "AWS::Region" }``). This way you get the same defaulting behavior that is normally used
        for built-in data.

        :param service: the name of the service (s3, s3.amazonaws.com, ...).
        :param region: the region in which the service principal is needed.
        :param url_suffix: the URL suffix for the partition in which the region is located.

        stability
        :stability: experimental
        """
        return jsii.sinvoke(cls, "servicePrincipal", [service, region, url_suffix])
Exemplo n.º 15
0
    def find(
        cls,
        region: builtins.str,
        name: builtins.str,
    ) -> typing.Optional[builtins.str]:
        '''(experimental) Retrieves a fact from this Fact database.

        :param region: the name of the region (e.g: ``us-east-1``).
        :param name: the name of the fact being looked up (see the ``FactName`` class for details).

        :return: the fact value if it is known, and ``undefined`` otherwise.

        :stability: experimental
        '''
        return typing.cast(typing.Optional[builtins.str],
                           jsii.sinvoke(cls, "find", [region, name]))
Exemplo n.º 16
0
    def manifest(
        cls,
        *,
        metadata: typing.Optional[cdk8s.ApiObjectMetadata] = None,
        spec: typing.Optional["CronTabSpec"] = None,
    ) -> typing.Any:
        '''Renders a Kubernetes manifest for "CronTab".

        This can be used to inline resource manifests inside other objects (e.g. as templates).

        :param metadata: 
        :param spec: 
        '''
        props = CronTabProps(metadata=metadata, spec=spec)

        return typing.cast(typing.Any, jsii.sinvoke(cls, "manifest", [props]))
Exemplo n.º 17
0
    def region_map(
        cls,
        fact_name: builtins.str,
    ) -> typing.Mapping[builtins.str, builtins.str]:
        """(experimental) Retrieves a collection of all fact values for all regions that fact is defined in.

        :param fact_name: the name of the fact to retrieve values for. For a list of common fact names, see the FactName class

        :return:

        a mapping with AWS region codes as the keys,
        and the fact in the given region as the value for that key

        :stability: experimental
        """
        return jsii.sinvoke(cls, "regionMap", [fact_name])
Exemplo n.º 18
0
    def from_repository_attributes(cls, scope: aws_cdk.cdk.Construct, id: str, *, repository_arn: str, repository_name: str) -> "IRepository":
        """Import a repository.

        Arguments:
            scope: -
            id: -
            attrs: -
            repositoryArn: 
            repositoryName: 

        Stability:
            experimental
        """
        attrs: RepositoryAttributes = {"repositoryArn": repository_arn, "repositoryName": repository_name}

        return jsii.sinvoke(cls, "fromRepositoryAttributes", [scope, id, attrs])
Exemplo n.º 19
0
    def from_stream_attributes(
        cls,
        scope: aws_cdk.core.Construct,
        id: str,
        *,
        stream_arn: str,
        encryption_key: typing.Optional[aws_cdk.aws_kms.IKey] = None,
    ) -> "IStream":
        """Creates a Stream construct that represents an external stream.

        :param scope: The parent creating construct (usually ``this``).
        :param id: The construct's name.
        :param stream_arn: The ARN of the stream.
        :param encryption_key: The KMS key securing the contents of the stream if encryption is enabled. Default: - No encryption
        """
        attrs = StreamAttributes(stream_arn=stream_arn,
                                 encryption_key=encryption_key)

        return jsii.sinvoke(cls, "fromStreamAttributes", [scope, id, attrs])
Exemplo n.º 20
0
    def from_alias_attributes(cls, scope: aws_cdk.cdk.Construct, id: str, *,
                              alias_name: str,
                              alias_target_key: "IKey") -> "IAlias":
        """
        Arguments:
            scope: -
            id: -
            attrs: -
            aliasName: 
            aliasTargetKey: 

        Stability:
            experimental
        """
        attrs: AliasAttributes = {
            "aliasName": alias_name,
            "aliasTargetKey": alias_target_key
        }

        return jsii.sinvoke(cls, "fromAliasAttributes", [scope, id, attrs])
Exemplo n.º 21
0
    def from_cloud_formation(
            cls, scope: aws_cdk.core.Construct, id: str,
            resource_attributes: typing.Any, *,
            finder: aws_cdk.core.ICfnFinder) -> "CfnCertificate":
        """A factory method that creates a new instance of this class from an object containing the CloudFormation properties of this resource.

        Used in the @aws-cdk/cloudformation-include module.

        :param scope: -
        :param id: -
        :param resource_attributes: -
        :param finder: The finder interface used to resolve references across the template.

        stability
        :stability: experimental
        """
        options = aws_cdk.core.FromCloudFormationOptions(finder=finder)

        return jsii.sinvoke(cls, "fromCloudFormation",
                            [scope, id, resource_attributes, options])
Exemplo n.º 22
0
    def input(
        cls,
        *,
        version: str,
        docker_images: typing.Optional[typing.Mapping[
            str, "DockerImageAsset"]] = None,
        files: typing.Optional[typing.Mapping[str,
                                              "FileAsset"]] = None) -> None:
        """Take a ManifestFile as input.

        The presence of this method makes sure the struct is only ever weakened
        in future releases.

        :param version: Version of the manifest.
        :param docker_images: The Docker image assets in this manifest. Default: - No Docker images
        :param files: The file assets in this manifest. Default: - No files
        """
        file = ManifestFile(version=version,
                            docker_images=docker_images,
                            files=files)

        return jsii.sinvoke(cls, "input", [file])
Exemplo n.º 23
0
    def from_email(
        cls,
        validation_domains: typing.Optional[typing.Mapping[str, str]] = None
    ) -> "CertificateValidation":
        """Validate the certifcate with Email.

        IMPORTANT: if you are creating a certificate as part of your stack, the stack
        will not complete creating until you read and follow the instructions in the
        email that you will receive.

        ACM will send validation emails to the following addresses:

        [email protected]
        [email protected]
        [email protected]
        [email protected]
        [email protected]

        For every domain that you register.

        :param validation_domains: a map of validation domains to use for domains in the certificate.
        """
        return jsii.sinvoke(cls, "fromEmail", [validation_domains])
    def from_manifest(
        cls,
        assembly: "CloudAssembly",
        id: builtins.str,
        *,
        type: ros_cdk_assembly_schema.ArtifactType,
        dependencies: typing.Optional[typing.Sequence[builtins.str]] = None,
        metadata: typing.Optional[typing.Mapping[
            builtins.str,
            typing.Sequence[ros_cdk_assembly_schema.MetadataEntry]]] = None,
        properties: typing.Optional[typing.Union[
            ros_cdk_assembly_schema.AliyunRosStackProperties,
            ros_cdk_assembly_schema.TreeArtifactProperties,
            ros_cdk_assembly_schema.NestedCloudAssemblyProperties]] = None,
    ) -> typing.Optional["CloudArtifact"]:
        '''Returns a subclass of ``CloudArtifact`` based on the artifact type defined in the artifact manifest.

        :param assembly: The cloud assembly from which to load the artifact.
        :param id: The artifact ID.
        :param type: The type of artifact.
        :param dependencies: IDs of artifacts that must be deployed before this artifact. Default: - no dependencies.
        :param metadata: Associated metadata. Default: - no metadata.
        :param properties: The set of properties for this artifact (depends on type). Default: - no properties.

        :return: the ``CloudArtifact`` that matches the artifact type or ``undefined`` if it's an artifact type that is unrecognized by this module.
        '''
        artifact = ros_cdk_assembly_schema.ArtifactManifest(
            type=type,
            dependencies=dependencies,
            metadata=metadata,
            properties=properties,
        )

        return typing.cast(
            typing.Optional["CloudArtifact"],
            jsii.sinvoke(cls, "fromManifest", [assembly, id, artifact]))
Exemplo n.º 25
0
    def of(cls, id: str) -> "PhysicalResourceId":
        """Explicit physical resource id.

        :param id: -
        """
        return jsii.sinvoke(cls, "of", [id])
Exemplo n.º 26
0
    def from_response(cls, response_path: str) -> "PhysicalResourceId":
        """Extract the physical resource id from the path (dot notation) to the data in the API call response.

        :param response_path: -
        """
        return jsii.sinvoke(cls, "fromResponse", [response_path])
Exemplo n.º 27
0
    def from_statements(cls, statements: typing.List[aws_cdk.aws_iam.PolicyStatement]) -> "AwsCustomResourcePolicy":
        """Explicit IAM Policy Statements.

        :param statements: the statements to propagate to the SDK calls.
        """
        return jsii.sinvoke(cls, "fromStatements", [statements])
Exemplo n.º 28
0
    def topic(cls, topic: aws_cdk.aws_sns.ITopic) -> "CustomResourceProvider":
        """The SNS Topic for the provider that implements this custom resource.

        :param topic: -
        """
        return jsii.sinvoke(cls, "topic", [topic])
Exemplo n.º 29
0
 def version(cls) -> builtins.str:
     '''Fetch the current schema version number.'''
     return typing.cast(builtins.str, jsii.sinvoke(cls, "version", []))
Exemplo n.º 30
0
    def of(cls, construct: "IConstruct") -> "Node":
        """Returns the node associated with a construct.

        :param construct: the construct.
        """
        return jsii.sinvoke(cls, "of", [construct])