CfnImageBuilder

class aws_cdk.aws_appstream.CfnImageBuilder(scope, id, *, instance_type, name, access_endpoints=None, appstream_agent_version=None, description=None, display_name=None, domain_join_info=None, enable_default_internet_access=None, iam_role_arn=None, image_arn=None, image_name=None, tags=None, vpc_config=None)

Bases: CfnResource

A CloudFormation AWS::AppStream::ImageBuilder.

The AWS::AppStream::ImageBuilder resource creates an image builder for Amazon AppStream 2.0. An image builder is a virtual machine that is used to create an image.

The initial state of the image builder is PENDING . When it is ready, the state is RUNNING .

CloudformationResource

AWS::AppStream::ImageBuilder

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appstream as appstream

cfn_image_builder = appstream.CfnImageBuilder(self, "MyCfnImageBuilder",
    instance_type="instanceType",
    name="name",

    # the properties below are optional
    access_endpoints=[appstream.CfnImageBuilder.AccessEndpointProperty(
        endpoint_type="endpointType",
        vpce_id="vpceId"
    )],
    appstream_agent_version="appstreamAgentVersion",
    description="description",
    display_name="displayName",
    domain_join_info=appstream.CfnImageBuilder.DomainJoinInfoProperty(
        directory_name="directoryName",
        organizational_unit_distinguished_name="organizationalUnitDistinguishedName"
    ),
    enable_default_internet_access=False,
    iam_role_arn="iamRoleArn",
    image_arn="imageArn",
    image_name="imageName",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vpc_config=appstream.CfnImageBuilder.VpcConfigProperty(
        security_group_ids=["securityGroupIds"],
        subnet_ids=["subnetIds"]
    )
)

Create a new AWS::AppStream::ImageBuilder.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • instance_type (str) – The instance type to use when launching the image builder. The following instance types are available:. - stream.standard.small - stream.standard.medium - stream.standard.large - stream.compute.large - stream.compute.xlarge - stream.compute.2xlarge - stream.compute.4xlarge - stream.compute.8xlarge - stream.memory.large - stream.memory.xlarge - stream.memory.2xlarge - stream.memory.4xlarge - stream.memory.8xlarge - stream.memory.z1d.large - stream.memory.z1d.xlarge - stream.memory.z1d.2xlarge - stream.memory.z1d.3xlarge - stream.memory.z1d.6xlarge - stream.memory.z1d.12xlarge - stream.graphics-design.large - stream.graphics-design.xlarge - stream.graphics-design.2xlarge - stream.graphics-design.4xlarge - stream.graphics-desktop.2xlarge - stream.graphics.g4dn.xlarge - stream.graphics.g4dn.2xlarge - stream.graphics.g4dn.4xlarge - stream.graphics.g4dn.8xlarge - stream.graphics.g4dn.12xlarge - stream.graphics.g4dn.16xlarge - stream.graphics-pro.4xlarge - stream.graphics-pro.8xlarge - stream.graphics-pro.16xlarge

  • name (str) – A unique name for the image builder.

  • access_endpoints (Union[IResolvable, Sequence[Union[AccessEndpointProperty, Dict[str, Any], IResolvable]], None]) – The list of virtual private cloud (VPC) interface endpoint objects. Administrators can connect to the image builder only through the specified endpoints.

  • appstream_agent_version (Optional[str]) – The version of the AppStream 2.0 agent to use for this image builder. To use the latest version of the AppStream 2.0 agent, specify [LATEST].

  • description (Optional[str]) – The description to display.

  • display_name (Optional[str]) – The image builder name to display.

  • domain_join_info (Union[DomainJoinInfoProperty, Dict[str, Any], IResolvable, None]) – The name of the directory and organizational unit (OU) to use to join the image builder to a Microsoft Active Directory domain.

  • enable_default_internet_access (Union[bool, IResolvable, None]) – Enables or disables default internet access for the image builder.

  • iam_role_arn (Optional[str]) – The ARN of the IAM role that is applied to the image builder. To assume a role, the image builder calls the AWS Security Token Service AssumeRole API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates the appstream_machine_role credential profile on the instance. For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances in the Amazon AppStream 2.0 Administration Guide .

  • image_arn (Optional[str]) – The ARN of the public, private, or shared image to use.

  • image_name (Optional[str]) – The name of the image used to create the image builder.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs.

  • vpc_config (Union[VpcConfigProperty, Dict[str, Any], IResolvable, None]) – The VPC configuration for the image builder. You can specify only one subnet.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters

target (CfnResource) –

Deprecated

use addDependency

Stability

deprecated

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

Return type

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

# Example automatically generated from non-compiling source. May contain errors.
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

Return type

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type

List[Union[CfnResource, Stack]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters

target (CfnResource) –

Return type

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters
Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::AppStream::ImageBuilder'
access_endpoints

The list of virtual private cloud (VPC) interface endpoint objects.

Administrators can connect to the image builder only through the specified endpoints.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-accessendpoints

appstream_agent_version

The version of the AppStream 2.0 agent to use for this image builder. To use the latest version of the AppStream 2.0 agent, specify [LATEST].

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-appstreamagentversion

attr_streaming_url

The URL to start an image builder streaming session, returned as a string.

CloudformationAttribute

StreamingUrl

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

description

The description to display.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-description

display_name

The image builder name to display.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-displayname

domain_join_info

The name of the directory and organizational unit (OU) to use to join the image builder to a Microsoft Active Directory domain.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-domainjoininfo

enable_default_internet_access

Enables or disables default internet access for the image builder.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-enabledefaultinternetaccess

iam_role_arn

The ARN of the IAM role that is applied to the image builder.

To assume a role, the image builder calls the AWS Security Token Service AssumeRole API operation and passes the ARN of the role to use. The operation creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary credentials and creates the appstream_machine_role credential profile on the instance.

For more information, see Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances in the Amazon AppStream 2.0 Administration Guide .

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-iamrolearn

image_arn

The ARN of the public, private, or shared image to use.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-imagearn

image_name

The name of the image used to create the image builder.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-imagename

instance_type

.

  • stream.standard.small

  • stream.standard.medium

  • stream.standard.large

  • stream.compute.large

  • stream.compute.xlarge

  • stream.compute.2xlarge

  • stream.compute.4xlarge

  • stream.compute.8xlarge

  • stream.memory.large

  • stream.memory.xlarge

  • stream.memory.2xlarge

  • stream.memory.4xlarge

  • stream.memory.8xlarge

  • stream.memory.z1d.large

  • stream.memory.z1d.xlarge

  • stream.memory.z1d.2xlarge

  • stream.memory.z1d.3xlarge

  • stream.memory.z1d.6xlarge

  • stream.memory.z1d.12xlarge

  • stream.graphics-design.large

  • stream.graphics-design.xlarge

  • stream.graphics-design.2xlarge

  • stream.graphics-design.4xlarge

  • stream.graphics-desktop.2xlarge

  • stream.graphics.g4dn.xlarge

  • stream.graphics.g4dn.2xlarge

  • stream.graphics.g4dn.4xlarge

  • stream.graphics.g4dn.8xlarge

  • stream.graphics.g4dn.12xlarge

  • stream.graphics.g4dn.16xlarge

  • stream.graphics-pro.4xlarge

  • stream.graphics-pro.8xlarge

  • stream.graphics-pro.16xlarge

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-instancetype

Type

The instance type to use when launching the image builder. The following instance types are available

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

A unique name for the image builder.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-name

node

The tree node.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

An array of key-value pairs.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-tags

vpc_config

The VPC configuration for the image builder.

You can specify only one subnet.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appstream-imagebuilder.html#cfn-appstream-imagebuilder-vpcconfig

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters

x (Any) – Any object.

Return type

bool

Returns

true if x is an object created from a class which extends Construct.

AccessEndpointProperty

class CfnImageBuilder.AccessEndpointProperty(*, endpoint_type, vpce_id)

Bases: object

Describes an interface VPC endpoint (interface endpoint) that lets you create a private connection between the virtual private cloud (VPC) that you specify and AppStream 2.0. When you specify an interface endpoint for a stack, users of the stack can connect to AppStream 2.0 only through that endpoint. When you specify an interface endpoint for an image builder, administrators can connect to the image builder only through that endpoint.

Parameters
  • endpoint_type (str) – The type of interface endpoint.

  • vpce_id (str) – The identifier (ID) of the VPC in which the interface endpoint is used.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-accessendpoint.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appstream as appstream

access_endpoint_property = appstream.CfnImageBuilder.AccessEndpointProperty(
    endpoint_type="endpointType",
    vpce_id="vpceId"
)

Attributes

endpoint_type

The type of interface endpoint.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-accessendpoint.html#cfn-appstream-imagebuilder-accessendpoint-endpointtype

vpce_id

The identifier (ID) of the VPC in which the interface endpoint is used.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-accessendpoint.html#cfn-appstream-imagebuilder-accessendpoint-vpceid

DomainJoinInfoProperty

class CfnImageBuilder.DomainJoinInfoProperty(*, directory_name=None, organizational_unit_distinguished_name=None)

Bases: object

The name of the directory and organizational unit (OU) to use to join the image builder to a Microsoft Active Directory domain.

Parameters
  • directory_name (Optional[str]) – The fully qualified name of the directory (for example, corp.example.com).

  • organizational_unit_distinguished_name (Optional[str]) – The distinguished name of the organizational unit for computer accounts.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-domainjoininfo.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appstream as appstream

domain_join_info_property = appstream.CfnImageBuilder.DomainJoinInfoProperty(
    directory_name="directoryName",
    organizational_unit_distinguished_name="organizationalUnitDistinguishedName"
)

Attributes

directory_name

The fully qualified name of the directory (for example, corp.example.com).

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-domainjoininfo.html#cfn-appstream-imagebuilder-domainjoininfo-directoryname

organizational_unit_distinguished_name

The distinguished name of the organizational unit for computer accounts.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-domainjoininfo.html#cfn-appstream-imagebuilder-domainjoininfo-organizationalunitdistinguishedname

VpcConfigProperty

class CfnImageBuilder.VpcConfigProperty(*, security_group_ids=None, subnet_ids=None)

Bases: object

The VPC configuration for the image builder.

Parameters
  • security_group_ids (Optional[Sequence[str]]) – The identifiers of the security groups for the image builder.

  • subnet_ids (Optional[Sequence[str]]) – The identifier of the subnet to which a network interface is attached from the image builder instance. An image builder instance can use one subnet.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-vpcconfig.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appstream as appstream

vpc_config_property = appstream.CfnImageBuilder.VpcConfigProperty(
    security_group_ids=["securityGroupIds"],
    subnet_ids=["subnetIds"]
)

Attributes

security_group_ids

The identifiers of the security groups for the image builder.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-vpcconfig.html#cfn-appstream-imagebuilder-vpcconfig-securitygroupids

subnet_ids

The identifier of the subnet to which a network interface is attached from the image builder instance.

An image builder instance can use one subnet.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-imagebuilder-vpcconfig.html#cfn-appstream-imagebuilder-vpcconfig-subnetids