def __init__(
        self,
        bucket: aws_cdk.aws_s3.IBucket,
        *,
        origin_access_identity: typing.Optional[
            aws_cdk.aws_cloudfront.IOriginAccessIdentity] = None,
        origin_path: typing.Optional[builtins.str] = None,
    ) -> None:
        """
        :param bucket: -
        :param origin_access_identity: (experimental) An optional Origin Access Identity of the origin identity cloudfront will use when calling your s3 bucket. Default: - An Origin Access Identity will be created.
        :param origin_path: (experimental) An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. Must begin, but not end, with '/' (e.g., '/production/images'). Default: '/'

        :stability: experimental
        """
        props = S3OriginProps(origin_access_identity=origin_access_identity,
                              origin_path=origin_path)

        jsii.create(S3Origin, self, [bucket, props])
    def __init__(
        self,
        load_balancer: aws_cdk.aws_elasticloadbalancingv2.ILoadBalancerV2,
        *,
        http_port: typing.Optional[jsii.Number] = None,
        https_port: typing.Optional[jsii.Number] = None,
        keepalive_timeout: typing.Optional[aws_cdk.core.Duration] = None,
        protocol_policy: typing.Optional[
            aws_cdk.aws_cloudfront.OriginProtocolPolicy] = None,
        read_timeout: typing.Optional[aws_cdk.core.Duration] = None,
        connection_attempts: typing.Optional[jsii.Number] = None,
        connection_timeout: typing.Optional[aws_cdk.core.Duration] = None,
        custom_headers: typing.Optional[typing.Mapping[builtins.str,
                                                       builtins.str]] = None,
        origin_path: typing.Optional[builtins.str] = None,
    ) -> None:
        """
        :param load_balancer: -
        :param http_port: (experimental) The HTTP port that CloudFront uses to connect to the origin. Default: 80
        :param https_port: (experimental) The HTTPS port that CloudFront uses to connect to the origin. Default: 443
        :param keepalive_timeout: (experimental) Specifies how long, in seconds, CloudFront persists its connection to the origin. The valid range is from 1 to 60 seconds, inclusive. Default: Duration.seconds(5)
        :param protocol_policy: (experimental) Specifies the protocol (HTTP or HTTPS) that CloudFront uses to connect to the origin. Default: OriginProtocolPolicy.HTTPS_ONLY
        :param read_timeout: (experimental) Specifies how long, in seconds, CloudFront waits for a response from the origin, also known as the origin response timeout. The valid range is from 1 to 60 seconds, inclusive. Default: Duration.seconds(30)
        :param connection_attempts: (experimental) The number of times that CloudFront attempts to connect to the origin; valid values are 1, 2, or 3 attempts. Default: 3
        :param connection_timeout: (experimental) The number of seconds that CloudFront waits when trying to establish a connection to the origin. Valid values are 1-10 seconds, inclusive. Default: Duration.seconds(10)
        :param custom_headers: (experimental) A list of HTTP header names and values that CloudFront adds to requests it sends to the origin. Default: {}
        :param origin_path: (experimental) An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin. Must begin, but not end, with '/' (e.g., '/production/images'). Default: '/'

        :stability: experimental
        """
        props = LoadBalancerV2OriginProps(
            http_port=http_port,
            https_port=https_port,
            keepalive_timeout=keepalive_timeout,
            protocol_policy=protocol_policy,
            read_timeout=read_timeout,
            connection_attempts=connection_attempts,
            connection_timeout=connection_timeout,
            custom_headers=custom_headers,
            origin_path=origin_path,
        )

        jsii.create(LoadBalancerV2Origin, self, [load_balancer, props])
Exemple #3
0
    def __init__(
        self,
        scope: aws_cdk.cdk.Construct,
        id: str,
        *,
        description: typing.Optional[str] = None,
        enabled: typing.Optional[bool] = None,
        enable_key_rotation: typing.Optional[bool] = None,
        policy: typing.Optional[aws_cdk.aws_iam.PolicyDocument] = None,
        removal_policy: typing.Optional[aws_cdk.cdk.RemovalPolicy] = None
    ) -> None:
        """
        Arguments:
            scope: -
            id: -
            props: -
            description: A description of the key. Use a description that helps your users decide whether the key is appropriate for a particular task. Default: - No description.
            enabled: Indicates whether the key is available for use. Default: - Key is enabled.
            enableKeyRotation: Indicates whether AWS KMS rotates the key. Default: false
            policy: Custom policy document to attach to the KMS key. Default: - A policy document with permissions for the account root to administer the key will be created.
            removalPolicy: Whether the encryption key should be retained when it is removed from the Stack. This is useful when one wants to retain access to data that was encrypted with a key that is being retired. Default: RemovalPolicy.Retain

        Stability:
            experimental
        """
        props: KeyProps = {}

        if description is not None:
            props["description"] = description

        if enabled is not None:
            props["enabled"] = enabled

        if enable_key_rotation is not None:
            props["enableKeyRotation"] = enable_key_rotation

        if policy is not None:
            props["policy"] = policy

        if removal_policy is not None:
            props["removalPolicy"] = removal_policy

        jsii.create(Key, self, [scope, id, props])
    def __init__(
        self,
        scope: aws_cdk.core.Construct,
        id: builtins.str,
        *,
        consumer_name: builtins.str,
        stream_arn: builtins.str,
    ) -> None:
        '''Create a new ``AWS::Kinesis::StreamConsumer``.

        :param scope: - scope in which this resource is defined.
        :param id: - scoped id of the resource.
        :param consumer_name: ``AWS::Kinesis::StreamConsumer.ConsumerName``.
        :param stream_arn: ``AWS::Kinesis::StreamConsumer.StreamARN``.
        '''
        props = CfnStreamConsumerProps(consumer_name=consumer_name,
                                       stream_arn=stream_arn)

        jsii.create(CfnStreamConsumer, self, [scope, id, props])
Exemple #5
0
def mock_lambda_init(
    self,
    scope: constructs.Construct,
    id: builtins.str,
    *,
    code: Code,
    handler: builtins.str,
    runtime: Runtime,
    **kwargs
) -> None:
    # overriding the code will prevent building with docker (a long running operation)
    # override the runtime for now, as well, to support inline code
    props = FunctionProps(
        code=Code.from_inline("return"),
        handler=handler,
        runtime=Runtime.PYTHON_3_7,
        **kwargs
    )
    jsii.create(Function, self, [scope, id, props])
Exemple #6
0
    def __init__(
        self,
        scope: ros_cdk_core.Construct,
        id: builtins.str,
        props: "TrailProps",
        enable_resource_property_constraint: typing.Optional[builtins.bool] = None,
    ) -> None:
        '''Create a new ``ALIYUN::ACTIONTRAIL::Trail``.

        Param scope - scope in which this resource is defined
        Param id    - scoped id of the resource
        Param props - resource properties

        :param scope: -
        :param id: -
        :param props: -
        :param enable_resource_property_constraint: -
        '''
        jsii.create(self.__class__, self, [scope, id, props, enable_resource_property_constraint])
Exemple #7
0
    def __init__(self,
                 email_address: str,
                 *,
                 json: typing.Optional[bool] = None) -> None:
        """
        Arguments:
            emailAddress: -
            props: -
            json: Indicates if the full notification JSON should be sent to the email address or just the message text. Default: false (Message text)

        Stability:
            experimental
        """
        props: EmailSubscriptionProps = {}

        if json is not None:
            props["json"] = json

        jsii.create(EmailSubscription, self, [email_address, props])
Exemple #8
0
    def __init__(self,
                 url: str,
                 *,
                 raw_message_delivery: typing.Optional[bool] = None) -> None:
        """
        Arguments:
            url: -
            props: -
            rawMessageDelivery: The message to the queue is the same as it was sent to the topic. If false, the message will be wrapped in an SNS envelope. Default: false

        Stability:
            experimental
        """
        props: UrlSubscriptionProps = {}

        if raw_message_delivery is not None:
            props["rawMessageDelivery"] = raw_message_delivery

        jsii.create(UrlSubscription, self, [url, props])
Exemple #9
0
    def __init__(
        self,
        scope: constructs.Construct,
        id: builtins.str,
        *,
        path: builtins.str,
        readers: typing.Optional[typing.List[aws_cdk.aws_iam.IGrantable]] = None,
        source_hash: typing.Optional[builtins.str] = None,
        exclude: typing.Optional[typing.List[builtins.str]] = None,
        follow: typing.Optional[aws_cdk.assets.FollowMode] = None,
        ignore_mode: typing.Optional[aws_cdk.core.IgnoreMode] = None,
        asset_hash: typing.Optional[builtins.str] = None,
        asset_hash_type: typing.Optional[aws_cdk.core.AssetHashType] = None,
        bundling: typing.Optional[aws_cdk.core.BundlingOptions] = None,
    ) -> None:
        """
        :param scope: -
        :param id: -
        :param path: (experimental) The disk location of the asset. The path should refer to one of the following: - A regular file or a .zip file, in which case the file will be uploaded as-is to S3. - A directory, in which case it will be archived into a .zip file and uploaded to S3.
        :param readers: (experimental) A list of principals that should be able to read this asset from S3. You can use ``asset.grantRead(principal)`` to grant read permissions later. Default: - No principals that can read file asset.
        :param source_hash: (deprecated) Custom hash to use when identifying the specific version of the asset. For consistency, this custom hash will be SHA256 hashed and encoded as hex. The resulting hash will be the asset hash. NOTE: the source hash is used in order to identify a specific revision of the asset, and used for optimizing and caching deployment activities related to this asset such as packaging, uploading to Amazon S3, etc. If you chose to customize the source hash, you will need to make sure it is updated every time the source changes, or otherwise it is possible that some deployments will not be invalidated. Default: - automatically calculate source hash based on the contents of the source file or directory.
        :param exclude: (deprecated) Glob patterns to exclude from the copy. Default: nothing is excluded
        :param follow: (deprecated) A strategy for how to handle symlinks. Default: Never
        :param ignore_mode: (deprecated) The ignore behavior to use for exclude patterns. Default: - GLOB for file assets, DOCKER or GLOB for docker assets depending on whether the '
        :param asset_hash: Specify a custom hash for this asset. If ``assetHashType`` is set it must be set to ``AssetHashType.CUSTOM``. For consistency, this custom hash will be SHA256 hashed and encoded as hex. The resulting hash will be the asset hash. NOTE: the hash is used in order to identify a specific revision of the asset, and used for optimizing and caching deployment activities related to this asset such as packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will need to make sure it is updated every time the asset changes, or otherwise it is possible that some deployments will not be invalidated. Default: - based on ``assetHashType``
        :param asset_hash_type: Specifies the type of hash to calculate for this asset. If ``assetHash`` is configured, this option must be ``undefined`` or ``AssetHashType.CUSTOM``. Default: - the default is ``AssetHashType.SOURCE``, but if ``assetHash`` is explicitly specified this value defaults to ``AssetHashType.CUSTOM``.
        :param bundling: (experimental) Bundle the asset by executing a command in a Docker container. The asset path will be mounted at ``/asset-input``. The Docker container is responsible for putting content at ``/asset-output``. The content at ``/asset-output`` will be zipped and used as the final asset. Default: - uploaded as-is to S3 if the asset is a regular file or a .zip file, archived into a .zip file and uploaded to S3 otherwise

        :stability: experimental
        """
        props = AssetProps(
            path=path,
            readers=readers,
            source_hash=source_hash,
            exclude=exclude,
            follow=follow,
            ignore_mode=ignore_mode,
            asset_hash=asset_hash,
            asset_hash_type=asset_hash_type,
            bundling=bundling,
        )

        jsii.create(Asset, self, [scope, id, props])
Exemple #10
0
    def __init__(self, scope: aws_cdk.core.Construct, id: str, *, hosted_zone: aws_cdk.aws_route53.IHostedZone, custom_resource_role: typing.Optional[aws_cdk.aws_iam.IRole]=None, region: typing.Optional[str]=None, domain_name: str, subject_alternative_names: typing.Optional[typing.List[str]]=None, validation_domains: typing.Optional[typing.Mapping[str,str]]=None, validation_method: typing.Optional["ValidationMethod"]=None) -> None:
        """
        :param scope: -
        :param id: -
        :param props: -
        :param hosted_zone: Route 53 Hosted Zone used to perform DNS validation of the request. The zone must be authoritative for the domain name specified in the Certificate Request.
        :param custom_resource_role: Role to use for the custom resource that creates the validated certificate. Default: - A new role will be created
        :param region: AWS region that will host the certificate. This is needed especially for certificates used for CloudFront distributions, which require the region to be us-east-1. Default: the region the stack is deployed in.
        :param domain_name: Fully-qualified domain name to request a certificate for. May contain wildcards, such as ``*.domain.com``.
        :param subject_alternative_names: Alternative domain names on your certificate. Use this to register alternative domain names that represent the same site. Default: - No additional FQDNs will be included as alternative domain names.
        :param validation_domains: What validation domain to use for every requested domain. Has to be a superdomain of the requested domain. Default: - Apex domain is used for every domain that's not overridden.
        :param validation_method: Validation method used to assert domain ownership. Default: ValidationMethod.EMAIL

        stability
        :stability: experimental
        """
        props = DnsValidatedCertificateProps(hosted_zone=hosted_zone, custom_resource_role=custom_resource_role, region=region, domain_name=domain_name, subject_alternative_names=subject_alternative_names, validation_domains=validation_domains, validation_method=validation_method)

        jsii.create(DnsValidatedCertificate, self, [scope, id, props])
Exemple #11
0
    def __init__(self,
                 *,
                 cluster: aws_cdk.aws_ecs.ICluster,
                 task_definition: aws_cdk.aws_ecs.TaskDefinition,
                 container_overrides: typing.Optional[
                     typing.List["ContainerOverride"]] = None,
                 security_group: typing.Optional[
                     aws_cdk.aws_ec2.ISecurityGroup] = None,
                 subnet_selection: typing.Optional[
                     aws_cdk.aws_ec2.SubnetSelection] = None,
                 task_count: typing.Optional[jsii.Number] = None) -> None:
        """
        Arguments:
            props: -
            cluster: Cluster where service will be deployed.
            taskDefinition: Task Definition of the task that should be started.
            containerOverrides: Container setting overrides. Key is the name of the container to override, value is the values you want to override.
            securityGroup: Existing security group to use for the task's ENIs. (Only applicable in case the TaskDefinition is configured for AwsVpc networking) Default: A new security group is created
            subnetSelection: In what subnets to place the task's ENIs. (Only applicable in case the TaskDefinition is configured for AwsVpc networking) Default: Private subnets
            taskCount: How many tasks should be started when this event is triggered. Default: 1

        Stability:
            experimental
        """
        props: EcsTaskProps = {
            "cluster": cluster,
            "taskDefinition": task_definition
        }

        if container_overrides is not None:
            props["containerOverrides"] = container_overrides

        if security_group is not None:
            props["securityGroup"] = security_group

        if subnet_selection is not None:
            props["subnetSelection"] = subnet_selection

        if task_count is not None:
            props["taskCount"] = task_count

        jsii.create(EcsTask, self, [props])
Exemple #12
0
    def __init__(
        self,
        url: str,
        *,
        protocol: typing.Optional[aws_cdk.aws_sns.SubscriptionProtocol] = None,
        raw_message_delivery: typing.Optional[bool] = None,
        filter_policy: typing.Optional[typing.Mapping[
            str, aws_cdk.aws_sns.SubscriptionFilter]] = None
    ) -> None:
        """
        :param url: -
        :param protocol: The subscription's protocol. Default: - Protocol is derived from url
        :param raw_message_delivery: The message to the queue is the same as it was sent to the topic. If false, the message will be wrapped in an SNS envelope. Default: false
        :param filter_policy: The filter policy. Default: - all messages are delivered
        """
        props = UrlSubscriptionProps(protocol=protocol,
                                     raw_message_delivery=raw_message_delivery,
                                     filter_policy=filter_policy)

        jsii.create(UrlSubscription, self, [url, props])
Exemple #13
0
    def __init__(
        self,
        scope: constructs.Construct,
        id: builtins.str,
        *,
        compute_platform: typing.Optional[ComputePlatform] = None,
        profiling_group_name: typing.Optional[builtins.str] = None,
    ) -> None:
        '''
        :param scope: -
        :param id: -
        :param compute_platform: The compute platform of the profiling group. Default: ComputePlatform.DEFAULT
        :param profiling_group_name: A name for the profiling group. Default: - automatically generated name.
        '''
        props = ProfilingGroupProps(
            compute_platform=compute_platform,
            profiling_group_name=profiling_group_name,
        )

        jsii.create(ProfilingGroup, self, [scope, id, props])
Exemple #14
0
    def __init__(self, scope: aws_cdk.cdk.Construct, id: str, *,
                 alias_name: str, target_key_id: str) -> None:
        """Create a new ``AWS::KMS::Alias``.

        Arguments:
            scope: - scope in which this resource is defined.
            id: - scoped id of the resource.
            props: - resource properties.
            aliasName: ``AWS::KMS::Alias.AliasName``.
            targetKeyId: ``AWS::KMS::Alias.TargetKeyId``.

        Stability:
            experimental
        """
        props: CfnAliasProps = {
            "aliasName": alias_name,
            "targetKeyId": target_key_id
        }

        jsii.create(CfnAlias, self, [scope, id, props])
    def __init__(
        self,
        email_address: str,
        *,
        json: typing.Optional[bool] = None,
        dead_letter_queue: typing.Optional[aws_cdk.aws_sqs.IQueue] = None,
        filter_policy: typing.Optional[typing.Mapping[
            str, aws_cdk.aws_sns.SubscriptionFilter]] = None
    ) -> None:
        """
        :param email_address: -
        :param json: Indicates if the full notification JSON should be sent to the email address or just the message text. Default: false (Message text)
        :param dead_letter_queue: Queue to be used as dead letter queue. If not passed no dead letter queue is enabled. Default: - No dead letter queue enabled.
        :param filter_policy: The filter policy. Default: - all messages are delivered
        """
        props = EmailSubscriptionProps(json=json,
                                       dead_letter_queue=dead_letter_queue,
                                       filter_policy=filter_policy)

        jsii.create(EmailSubscription, self, [email_address, props])
    def __init__(
        self,
        queue: aws_cdk.aws_sqs.IQueue,
        *,
        raw_message_delivery: typing.Optional[bool] = None,
        dead_letter_queue: typing.Optional[aws_cdk.aws_sqs.IQueue] = None,
        filter_policy: typing.Optional[typing.Mapping[
            str, aws_cdk.aws_sns.SubscriptionFilter]] = None
    ) -> None:
        """
        :param queue: -
        :param raw_message_delivery: The message to the queue is the same as it was sent to the topic. If false, the message will be wrapped in an SNS envelope. Default: false
        :param dead_letter_queue: Queue to be used as dead letter queue. If not passed no dead letter queue is enabled. Default: - No dead letter queue enabled.
        :param filter_policy: The filter policy. Default: - all messages are delivered
        """
        props = SqsSubscriptionProps(raw_message_delivery=raw_message_delivery,
                                     dead_letter_queue=dead_letter_queue,
                                     filter_policy=filter_policy)

        jsii.create(SqsSubscription, self, [queue, props])
Exemple #17
0
    def __init__(
        self,
        scope: constructs.Construct,
        id: builtins.str,
        *,
        directory: builtins.str,
        build_args: typing.Optional[typing.Mapping[builtins.str,
                                                   builtins.str]] = None,
        file: typing.Optional[builtins.str] = None,
        repository_name: typing.Optional[builtins.str] = None,
        target: typing.Optional[builtins.str] = None,
        extra_hash: typing.Optional[builtins.str] = None,
        exclude: typing.Optional[typing.List[builtins.str]] = None,
        follow: typing.Optional[aws_cdk.assets.FollowMode] = None,
    ) -> None:
        """
        :param scope: -
        :param id: -
        :param directory: (experimental) The directory where the Dockerfile is stored.
        :param build_args: (experimental) Build args to pass to the ``docker build`` command. Since Docker build arguments are resolved before deployment, keys and values cannot refer to unresolved tokens (such as ``lambda.functionArn`` or ``queue.queueUrl``). Default: - no build args are passed
        :param file: (experimental) Path to the Dockerfile (relative to the directory). Default: 'Dockerfile'
        :param repository_name: (deprecated) ECR repository name. Specify this property if you need to statically address the image, e.g. from a Kubernetes Pod. Note, this is only the repository name, without the registry and the tag parts. Default: - the default ECR repository for CDK assets
        :param target: (experimental) Docker target to build to. Default: - no target
        :param extra_hash: (deprecated) Extra information to encode into the fingerprint (e.g. build instructions and other inputs). Default: - hash is only based on source content
        :param exclude: (deprecated) Glob patterns to exclude from the copy. Default: nothing is excluded
        :param follow: (deprecated) A strategy for how to handle symlinks. Default: Never

        :stability: experimental
        """
        props = DockerImageAssetProps(
            directory=directory,
            build_args=build_args,
            file=file,
            repository_name=repository_name,
            target=target,
            extra_hash=extra_hash,
            exclude=exclude,
            follow=follow,
        )

        jsii.create(DockerImageAsset, self, [scope, id, props])
Exemple #18
0
    def __init__(
        self,
        scope: aws_cdk.core.Construct,
        id: str,
        *,
        domain_name: str,
        certificate_authority_arn: typing.Optional[str] = None,
        certificate_transparency_logging_preference: typing.
        Optional[str] = None,
        domain_validation_options: typing.Optional[typing.Union[
            aws_cdk.core.IResolvable,
            typing.List[typing.Union["DomainValidationOptionProperty",
                                     aws_cdk.core.IResolvable]], ]] = None,
        subject_alternative_names: typing.Optional[typing.List[str]] = None,
        tags: typing.Optional[typing.List[aws_cdk.core.CfnTag]] = None,
        validation_method: typing.Optional[str] = None,
    ) -> None:
        """Create a new ``AWS::CertificateManager::Certificate``.

        :param scope: - scope in which this resource is defined.
        :param id: - scoped id of the resource.
        :param domain_name: ``AWS::CertificateManager::Certificate.DomainName``.
        :param certificate_authority_arn: ``AWS::CertificateManager::Certificate.CertificateAuthorityArn``.
        :param certificate_transparency_logging_preference: ``AWS::CertificateManager::Certificate.CertificateTransparencyLoggingPreference``.
        :param domain_validation_options: ``AWS::CertificateManager::Certificate.DomainValidationOptions``.
        :param subject_alternative_names: ``AWS::CertificateManager::Certificate.SubjectAlternativeNames``.
        :param tags: ``AWS::CertificateManager::Certificate.Tags``.
        :param validation_method: ``AWS::CertificateManager::Certificate.ValidationMethod``.
        """
        props = CfnCertificateProps(
            domain_name=domain_name,
            certificate_authority_arn=certificate_authority_arn,
            certificate_transparency_logging_preference=
            certificate_transparency_logging_preference,
            domain_validation_options=domain_validation_options,
            subject_alternative_names=subject_alternative_names,
            tags=tags,
            validation_method=validation_method,
        )

        jsii.create(CfnCertificate, self, [scope, id, props])
Exemple #19
0
    def __init__(
        self,
        scope: aws_cdk.core.Construct,
        id: str,
        *,
        alias_name: str,
        target_key: "IKey",
        removal_policy: typing.Optional[aws_cdk.core.RemovalPolicy] = None
    ) -> None:
        """
        :param scope: -
        :param id: -
        :param alias_name: The name of the alias. The name must start with alias followed by a forward slash, such as alias/. You can't specify aliases that begin with alias/AWS. These aliases are reserved.
        :param target_key: The ID of the key for which you are creating the alias. Specify the key's globally unique identifier or Amazon Resource Name (ARN). You can't specify another alias.
        :param removal_policy: Policy to apply when the alias is removed from this stack. Default: - The alias will be deleted
        """
        props = AliasProps(alias_name=alias_name,
                           target_key=target_key,
                           removal_policy=removal_policy)

        jsii.create(Alias, self, [scope, id, props])
Exemple #20
0
    def __init__(self,
                 parent: aws_cdk.core.Construct,
                 id: str,
                 *,
                 table: aws_cdk.aws_dynamodb.Table,
                 sort_by: typing.Optional[str] = None,
                 title: typing.Optional[str] = None) -> None:
        """
        :param parent: -
        :param id: -
        :param props: -
        :param table: The DynamoDB table to view. Note that all contents of this table will be visible to the public.
        :param sort_by: Name of the column to sort by, prefix with "-" for descending order. Default: - No sort
        :param title: The web page title. Default: - No title

        stability
        :stability: experimental
        """
        props = TableViewerProps(table=table, sort_by=sort_by, title=title)

        jsii.create(TableViewer, self, [parent, id, props])
Exemple #21
0
    def __init__(
        self,
        scope: aws_cdk.core.Construct,
        id: str,
        *,
        profiling_group_name: str,
        agent_permissions: typing.Any = None,
    ) -> None:
        """Create a new ``AWS::CodeGuruProfiler::ProfilingGroup``.

        :param scope: - scope in which this resource is defined.
        :param id: - scoped id of the resource.
        :param profiling_group_name: ``AWS::CodeGuruProfiler::ProfilingGroup.ProfilingGroupName``.
        :param agent_permissions: ``AWS::CodeGuruProfiler::ProfilingGroup.AgentPermissions``.
        """
        props = CfnProfilingGroupProps(
            profiling_group_name=profiling_group_name,
            agent_permissions=agent_permissions,
        )

        jsii.create(CfnProfilingGroup, self, [scope, id, props])
Exemple #22
0
    def __init__(self,
                 scope: aws_cdk.core.Construct,
                 id: str,
                 *,
                 count: typing.Optional[jsii.Number] = None,
                 handle: typing.Optional[str] = None,
                 timeout: typing.Optional[str] = None) -> None:
        """Create a new ``AWS::CloudFormation::WaitCondition``.

        :param scope: - scope in which this resource is defined.
        :param id: - scoped id of the resource.
        :param props: - resource properties.
        :param count: ``AWS::CloudFormation::WaitCondition.Count``.
        :param handle: ``AWS::CloudFormation::WaitCondition.Handle``.
        :param timeout: ``AWS::CloudFormation::WaitCondition.Timeout``.
        """
        props = CfnWaitConditionProps(count=count,
                                      handle=handle,
                                      timeout=timeout)

        jsii.create(CfnWaitCondition, self, [scope, id, props])
Exemple #23
0
    def __init__(
        self,
        topic: aws_cdk.aws_sns.ITopic,
        *,
        message: typing.Optional[aws_cdk.aws_events.RuleTargetInput] = None
    ) -> None:
        """
        Arguments:
            topic: -
            props: -
            message: The message to send to the topic. Default: the entire CloudWatch event

        Stability:
            experimental
        """
        props: SnsTopicProps = {}

        if message is not None:
            props["message"] = message

        jsii.create(SnsTopic, self, [topic, props])
Exemple #24
0
    def __init__(
        self,
        machine: aws_cdk.aws_stepfunctions.IStateMachine,
        *,
        input: typing.Optional[aws_cdk.aws_events.RuleTargetInput] = None
    ) -> None:
        """
        Arguments:
            machine: -
            props: -
            input: The input to the state machine execution. Default: the entire CloudWatch event

        Stability:
            experimental
        """
        props: SfnStateMachineProps = {}

        if input is not None:
            props["input"] = input

        jsii.create(SfnStateMachine, self, [machine, props])
Exemple #25
0
    def __init__(
        self,
        handler: aws_cdk.aws_lambda.IFunction,
        *,
        event: typing.Optional[aws_cdk.aws_events.RuleTargetInput] = None
    ) -> None:
        """
        Arguments:
            handler: -
            props: -
            event: The event to send to the Lambda. This will be the payload sent to the Lambda Function. Default: the entire CloudWatch event

        Stability:
            experimental
        """
        props: LambdaFunctionProps = {}

        if event is not None:
            props["event"] = event

        jsii.create(LambdaFunction, self, [handler, props])
Exemple #26
0
    def __init__(
        self,
        scope: aws_cdk.cdk.Construct,
        id: str,
        *,
        hosted_zone: aws_cdk.aws_route53.IHostedZone,
        region: typing.Optional[str] = None,
        domain_name: str,
        subject_alternative_names: typing.Optional[typing.List[str]] = None,
        validation_domains: typing.Optional[typing.Mapping[str, str]] = None
    ) -> None:
        """
        Arguments:
            scope: -
            id: -
            props: -
            hostedZone: Route 53 Hosted Zone used to perform DNS validation of the request. The zone must be authoritative for the domain name specified in the Certificate Request.
            region: AWS region that will host the certificate. This is needed especially for certificates used for CloudFront distributions, which require the region to be us-east-1. Default: the region the stack is deployed in.
            domainName: Fully-qualified domain name to request a certificate for. May contain wildcards, such as ``*.domain.com``.
            subjectAlternativeNames: Alternative domain names on your certificate. Use this to register alternative domain names that represent the same site. Default: - No additional FQDNs will be included as alternative domain names.
            validationDomains: What validation domain to use for every requested domain. Has to be a superdomain of the requested domain. Default: - Apex domain is used for every domain that's not overridden.

        Stability:
            experimental
        """
        props: DnsValidatedCertificateProps = {
            "hostedZone": hosted_zone,
            "domainName": domain_name
        }

        if region is not None:
            props["region"] = region

        if subject_alternative_names is not None:
            props["subjectAlternativeNames"] = subject_alternative_names

        if validation_domains is not None:
            props["validationDomains"] = validation_domains

        jsii.create(DnsValidatedCertificate, self, [scope, id, props])
Exemple #27
0
    def __init__(self,
                 scope: aws_cdk.core.Construct,
                 id: str,
                 *,
                 source_path: str,
                 exclude: typing.Optional[typing.List[str]] = None,
                 follow: typing.Optional["FollowMode"] = None) -> None:
        """
        :param scope: -
        :param id: -
        :param source_path: 
        :param exclude: Glob patterns to exclude from the copy. Default: nothing is excluded
        :param follow: A strategy for how to handle symlinks. Default: Never

        stability
        :stability: experimental
        """
        props = StagingProps(source_path=source_path,
                             exclude=exclude,
                             follow=follow)

        jsii.create(Staging, self, [scope, id, props])
Exemple #28
0
    def __init__(
            self,
            scope: aws_cdk.cdk.Construct,
            id: str,
            *,
            directory: str,
            build_args: typing.Optional[typing.Mapping[str, str]] = None,
            repository_name: typing.Optional[str] = None,
            exclude: typing.Optional[typing.List[str]] = None,
            follow: typing.Optional[aws_cdk.assets.FollowMode] = None) -> None:
        """
        Arguments:
            scope: -
            id: -
            props: -
            directory: The directory where the Dockerfile is stored.
            buildArgs: Build args to pass to the ``docker build`` command. Default: no build args are passed
            repositoryName: ECR repository name. Specify this property if you need to statically address the image, e.g. from a Kubernetes Pod. Note, this is only the repository name, without the registry and the tag parts. Default: automatically derived from the asset's ID.
            exclude: Glob patterns to exclude from the copy. Default: nothing is excluded
            follow: A strategy for how to handle symlinks. Default: Never

        Stability:
            experimental
        """
        props: DockerImageAssetProps = {"directory": directory}

        if build_args is not None:
            props["buildArgs"] = build_args

        if repository_name is not None:
            props["repositoryName"] = repository_name

        if exclude is not None:
            props["exclude"] = exclude

        if follow is not None:
            props["follow"] = follow

        jsii.create(DockerImageAsset, self, [scope, id, props])
Exemple #29
0
    def __init__(
        self,
        scope: aws_cdk.core.Construct,
        id: str,
        *,
        key_policy: typing.Any,
        description: typing.Optional[str] = None,
        enabled: typing.Optional[
            typing.Union[typing.Optional[bool],
                         typing.Optional[aws_cdk.core.IResolvable]]] = None,
        enable_key_rotation: typing.Optional[
            typing.Union[typing.Optional[bool],
                         typing.Optional[aws_cdk.core.IResolvable]]] = None,
        key_usage: typing.Optional[str] = None,
        pending_window_in_days: typing.Optional[jsii.Number] = None,
        tags: typing.Optional[typing.List[aws_cdk.core.CfnTag]] = None
    ) -> None:
        """Create a new ``AWS::KMS::Key``.

        :param scope: - scope in which this resource is defined.
        :param id: - scoped id of the resource.
        :param props: - resource properties.
        :param key_policy: ``AWS::KMS::Key.KeyPolicy``.
        :param description: ``AWS::KMS::Key.Description``.
        :param enabled: ``AWS::KMS::Key.Enabled``.
        :param enable_key_rotation: ``AWS::KMS::Key.EnableKeyRotation``.
        :param key_usage: ``AWS::KMS::Key.KeyUsage``.
        :param pending_window_in_days: ``AWS::KMS::Key.PendingWindowInDays``.
        :param tags: ``AWS::KMS::Key.Tags``.
        """
        props = CfnKeyProps(key_policy=key_policy,
                            description=description,
                            enabled=enabled,
                            enable_key_rotation=enable_key_rotation,
                            key_usage=key_usage,
                            pending_window_in_days=pending_window_in_days,
                            tags=tags)

        jsii.create(CfnKey, self, [scope, id, props])
    def __init__(
        self,
        *,
        fallback_origin: aws_cdk.aws_cloudfront.IOrigin,
        primary_origin: aws_cdk.aws_cloudfront.IOrigin,
        fallback_status_codes: typing.Optional[typing.List[
            jsii.Number]] = None,
    ) -> None:
        """
        :param fallback_origin: (experimental) The fallback origin that should serve requests when the primary fails.
        :param primary_origin: (experimental) The primary origin that should serve requests for this group.
        :param fallback_status_codes: (experimental) The list of HTTP status codes that, when returned from the primary origin, would cause querying the fallback origin. Default: - 500, 502, 503 and 504

        :stability: experimental
        """
        props = OriginGroupProps(
            fallback_origin=fallback_origin,
            primary_origin=primary_origin,
            fallback_status_codes=fallback_status_codes,
        )

        jsii.create(OriginGroup, self, [props])