All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.appstream.model.CreateImageBuilderRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon AppStream module holds the client classes that are used for communicating with Amazon AppStream.

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.appstream.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 */
@Generated("software.amazon.awssdk:codegen")
public final class CreateImageBuilderRequest extends AppStreamRequest implements
        ToCopyableBuilder {
    private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Name")
            .getter(getter(CreateImageBuilderRequest::name)).setter(setter(Builder::name))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Name").build()).build();

    private static final SdkField IMAGE_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ImageName").getter(getter(CreateImageBuilderRequest::imageName)).setter(setter(Builder::imageName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageName").build()).build();

    private static final SdkField IMAGE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("ImageArn").getter(getter(CreateImageBuilderRequest::imageArn)).setter(setter(Builder::imageArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ImageArn").build()).build();

    private static final SdkField INSTANCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("InstanceType").getter(getter(CreateImageBuilderRequest::instanceType))
            .setter(setter(Builder::instanceType))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceType").build()).build();

    private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("Description").getter(getter(CreateImageBuilderRequest::description))
            .setter(setter(Builder::description))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build();

    private static final SdkField DISPLAY_NAME_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("DisplayName").getter(getter(CreateImageBuilderRequest::displayName))
            .setter(setter(Builder::displayName))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DisplayName").build()).build();

    private static final SdkField VPC_CONFIG_FIELD = SdkField. builder(MarshallingType.SDK_POJO)
            .memberName("VpcConfig").getter(getter(CreateImageBuilderRequest::vpcConfig)).setter(setter(Builder::vpcConfig))
            .constructor(VpcConfig::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VpcConfig").build()).build();

    private static final SdkField IAM_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("IamRoleArn").getter(getter(CreateImageBuilderRequest::iamRoleArn)).setter(setter(Builder::iamRoleArn))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("IamRoleArn").build()).build();

    private static final SdkField ENABLE_DEFAULT_INTERNET_ACCESS_FIELD = SdkField
            . builder(MarshallingType.BOOLEAN)
            .memberName("EnableDefaultInternetAccess")
            .getter(getter(CreateImageBuilderRequest::enableDefaultInternetAccess))
            .setter(setter(Builder::enableDefaultInternetAccess))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnableDefaultInternetAccess")
                    .build()).build();

    private static final SdkField DOMAIN_JOIN_INFO_FIELD = SdkField
            . builder(MarshallingType.SDK_POJO).memberName("DomainJoinInfo")
            .getter(getter(CreateImageBuilderRequest::domainJoinInfo)).setter(setter(Builder::domainJoinInfo))
            .constructor(DomainJoinInfo::builder)
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DomainJoinInfo").build()).build();

    private static final SdkField APPSTREAM_AGENT_VERSION_FIELD = SdkField. builder(MarshallingType.STRING)
            .memberName("AppstreamAgentVersion").getter(getter(CreateImageBuilderRequest::appstreamAgentVersion))
            .setter(setter(Builder::appstreamAgentVersion))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AppstreamAgentVersion").build())
            .build();

    private static final SdkField> TAGS_FIELD = SdkField
            .> builder(MarshallingType.MAP)
            .memberName("Tags")
            .getter(getter(CreateImageBuilderRequest::tags))
            .setter(setter(Builder::tags))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(),
                    MapTrait.builder()
                            .keyLocationName("key")
                            .valueLocationName("value")
                            .valueFieldInfo(
                                    SdkField. builder(MarshallingType.STRING)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("value").build()).build()).build()).build();

    private static final SdkField> ACCESS_ENDPOINTS_FIELD = SdkField
            .> builder(MarshallingType.LIST)
            .memberName("AccessEndpoints")
            .getter(getter(CreateImageBuilderRequest::accessEndpoints))
            .setter(setter(Builder::accessEndpoints))
            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AccessEndpoints").build(),
                    ListTrait
                            .builder()
                            .memberLocationName(null)
                            .memberFieldInfo(
                                    SdkField. builder(MarshallingType.SDK_POJO)
                                            .constructor(AccessEndpoint::builder)
                                            .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD)
                                                    .locationName("member").build()).build()).build()).build();

    private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, IMAGE_NAME_FIELD,
            IMAGE_ARN_FIELD, INSTANCE_TYPE_FIELD, DESCRIPTION_FIELD, DISPLAY_NAME_FIELD, VPC_CONFIG_FIELD, IAM_ROLE_ARN_FIELD,
            ENABLE_DEFAULT_INTERNET_ACCESS_FIELD, DOMAIN_JOIN_INFO_FIELD, APPSTREAM_AGENT_VERSION_FIELD, TAGS_FIELD,
            ACCESS_ENDPOINTS_FIELD));

    private final String name;

    private final String imageName;

    private final String imageArn;

    private final String instanceType;

    private final String description;

    private final String displayName;

    private final VpcConfig vpcConfig;

    private final String iamRoleArn;

    private final Boolean enableDefaultInternetAccess;

    private final DomainJoinInfo domainJoinInfo;

    private final String appstreamAgentVersion;

    private final Map tags;

    private final List accessEndpoints;

    private CreateImageBuilderRequest(BuilderImpl builder) {
        super(builder);
        this.name = builder.name;
        this.imageName = builder.imageName;
        this.imageArn = builder.imageArn;
        this.instanceType = builder.instanceType;
        this.description = builder.description;
        this.displayName = builder.displayName;
        this.vpcConfig = builder.vpcConfig;
        this.iamRoleArn = builder.iamRoleArn;
        this.enableDefaultInternetAccess = builder.enableDefaultInternetAccess;
        this.domainJoinInfo = builder.domainJoinInfo;
        this.appstreamAgentVersion = builder.appstreamAgentVersion;
        this.tags = builder.tags;
        this.accessEndpoints = builder.accessEndpoints;
    }

    /**
     * 

* A unique name for the image builder. *

* * @return A unique name for the image builder. */ public final String name() { return name; } /** *

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

* * @return The name of the image used to create the image builder. */ public final String imageName() { return imageName; } /** *

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

* * @return The ARN of the public, private, or shared image to use. */ public final String imageArn() { return imageArn; } /** *

* 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 *

    *
  • *
* * @return 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 *

    *
  • */ public final String instanceType() { return instanceType; } /** *

    * The description to display. *

    * * @return The description to display. */ public final String description() { return description; } /** *

    * The image builder name to display. *

    * * @return The image builder name to display. */ public final String displayName() { return displayName; } /** *

    * The VPC configuration for the image builder. You can specify only one subnet. *

    * * @return The VPC configuration for the image builder. You can specify only one subnet. */ public final VpcConfig vpcConfig() { return vpcConfig; } /** *

    * The Amazon Resource Name (ARN) of the IAM role to apply to the image builder. To assume a role, the image builder * calls the AWS Security Token Service (STS) 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. *

    * * @return The Amazon Resource Name (ARN) of the IAM role to apply to the image builder. To assume a role, the image * builder calls the AWS Security Token Service (STS) 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. */ public final String iamRoleArn() { return iamRoleArn; } /** *

    * Enables or disables default internet access for the image builder. *

    * * @return Enables or disables default internet access for the image builder. */ public final Boolean enableDefaultInternetAccess() { return enableDefaultInternetAccess; } /** *

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

    * * @return The name of the directory and organizational unit (OU) to use to join the image builder to a Microsoft * Active Directory domain. */ public final DomainJoinInfo domainJoinInfo() { return domainJoinInfo; } /** *

    * 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]. *

    * * @return 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]. */ public final String appstreamAgentVersion() { return appstreamAgentVersion; } /** * Returns true if the Tags property was specified by the sender (it may be empty), or false if the sender did not * specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS service. */ public final boolean hasTags() { return tags != null && !(tags instanceof SdkAutoConstructMap); } /** *

    * The tags to associate with the image builder. A tag is a key-value pair, and the value is optional. For example, * Environment=Test. If you do not specify a value, Environment=. *

    *

    * Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following special * characters: *

    *

    * _ . : / = + \ - @ *

    *

    * If you do not specify a value, the value is set to an empty string. *

    *

    * For more information about tags, see Tagging Your Resources * in the Amazon AppStream 2.0 Administration Guide. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    *

    * You can use {@link #hasTags()} to see if a value was sent in this field. *

    * * @return The tags to associate with the image builder. A tag is a key-value pair, and the value is optional. For * example, Environment=Test. If you do not specify a value, Environment=.

    *

    * Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following * special characters: *

    *

    * _ . : / = + \ - @ *

    *

    * If you do not specify a value, the value is set to an empty string. *

    *

    * For more information about tags, see Tagging Your * Resources in the Amazon AppStream 2.0 Administration Guide. */ public final Map tags() { return tags; } /** * Returns true if the AccessEndpoints property was specified by the sender (it may be empty), or false if the * sender did not specify the value (it will be empty). For responses returned by the SDK, the sender is the AWS * service. */ public final boolean hasAccessEndpoints() { return accessEndpoints != null && !(accessEndpoints instanceof SdkAutoConstructList); } /** *

    * The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the image builder * only through the specified endpoints. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    *

    * You can use {@link #hasAccessEndpoints()} to see if a value was sent in this field. *

    * * @return The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the image * builder only through the specified endpoints. */ public final List accessEndpoints() { return accessEndpoints; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(imageName()); hashCode = 31 * hashCode + Objects.hashCode(imageArn()); hashCode = 31 * hashCode + Objects.hashCode(instanceType()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(displayName()); hashCode = 31 * hashCode + Objects.hashCode(vpcConfig()); hashCode = 31 * hashCode + Objects.hashCode(iamRoleArn()); hashCode = 31 * hashCode + Objects.hashCode(enableDefaultInternetAccess()); hashCode = 31 * hashCode + Objects.hashCode(domainJoinInfo()); hashCode = 31 * hashCode + Objects.hashCode(appstreamAgentVersion()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(hasAccessEndpoints() ? accessEndpoints() : null); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof CreateImageBuilderRequest)) { return false; } CreateImageBuilderRequest other = (CreateImageBuilderRequest) obj; return Objects.equals(name(), other.name()) && Objects.equals(imageName(), other.imageName()) && Objects.equals(imageArn(), other.imageArn()) && Objects.equals(instanceType(), other.instanceType()) && Objects.equals(description(), other.description()) && Objects.equals(displayName(), other.displayName()) && Objects.equals(vpcConfig(), other.vpcConfig()) && Objects.equals(iamRoleArn(), other.iamRoleArn()) && Objects.equals(enableDefaultInternetAccess(), other.enableDefaultInternetAccess()) && Objects.equals(domainJoinInfo(), other.domainJoinInfo()) && Objects.equals(appstreamAgentVersion(), other.appstreamAgentVersion()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && hasAccessEndpoints() == other.hasAccessEndpoints() && Objects.equals(accessEndpoints(), other.accessEndpoints()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public final String toString() { return ToString.builder("CreateImageBuilderRequest").add("Name", name()).add("ImageName", imageName()) .add("ImageArn", imageArn()).add("InstanceType", instanceType()).add("Description", description()) .add("DisplayName", displayName()).add("VpcConfig", vpcConfig()).add("IamRoleArn", iamRoleArn()) .add("EnableDefaultInternetAccess", enableDefaultInternetAccess()).add("DomainJoinInfo", domainJoinInfo()) .add("AppstreamAgentVersion", appstreamAgentVersion()).add("Tags", hasTags() ? tags() : null) .add("AccessEndpoints", hasAccessEndpoints() ? accessEndpoints() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Name": return Optional.ofNullable(clazz.cast(name())); case "ImageName": return Optional.ofNullable(clazz.cast(imageName())); case "ImageArn": return Optional.ofNullable(clazz.cast(imageArn())); case "InstanceType": return Optional.ofNullable(clazz.cast(instanceType())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "DisplayName": return Optional.ofNullable(clazz.cast(displayName())); case "VpcConfig": return Optional.ofNullable(clazz.cast(vpcConfig())); case "IamRoleArn": return Optional.ofNullable(clazz.cast(iamRoleArn())); case "EnableDefaultInternetAccess": return Optional.ofNullable(clazz.cast(enableDefaultInternetAccess())); case "DomainJoinInfo": return Optional.ofNullable(clazz.cast(domainJoinInfo())); case "AppstreamAgentVersion": return Optional.ofNullable(clazz.cast(appstreamAgentVersion())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "AccessEndpoints": return Optional.ofNullable(clazz.cast(accessEndpoints())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((CreateImageBuilderRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends AppStreamRequest.Builder, SdkPojo, CopyableBuilder { /** *

    * A unique name for the image builder. *

    * * @param name * A unique name for the image builder. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

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

    * * @param imageName * The name of the image used to create the image builder. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageName(String imageName); /** *

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

    * * @param imageArn * The ARN of the public, private, or shared image to use. * @return Returns a reference to this object so that method calls can be chained together. */ Builder imageArn(String imageArn); /** *

    * 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 *

      *
    • *
    * * @param instanceType * 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 *

      *
    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceType(String instanceType); /** *

      * The description to display. *

      * * @param description * The description to display. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

      * The image builder name to display. *

      * * @param displayName * The image builder name to display. * @return Returns a reference to this object so that method calls can be chained together. */ Builder displayName(String displayName); /** *

      * The VPC configuration for the image builder. You can specify only one subnet. *

      * * @param vpcConfig * The VPC configuration for the image builder. You can specify only one subnet. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcConfig(VpcConfig vpcConfig); /** *

      * The VPC configuration for the image builder. You can specify only one subnet. *

      * This is a convenience that creates an instance of the {@link VpcConfig.Builder} avoiding the need to create * one manually via {@link VpcConfig#builder()}. * * When the {@link Consumer} completes, {@link VpcConfig.Builder#build()} is called immediately and its result * is passed to {@link #vpcConfig(VpcConfig)}. * * @param vpcConfig * a consumer that will call methods on {@link VpcConfig.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #vpcConfig(VpcConfig) */ default Builder vpcConfig(Consumer vpcConfig) { return vpcConfig(VpcConfig.builder().applyMutation(vpcConfig).build()); } /** *

      * The Amazon Resource Name (ARN) of the IAM role to apply to the image builder. To assume a role, the image * builder calls the AWS Security Token Service (STS) 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. *

      * * @param iamRoleArn * The Amazon Resource Name (ARN) of the IAM role to apply to the image builder. To assume a role, the * image builder calls the AWS Security Token Service (STS) 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. * @return Returns a reference to this object so that method calls can be chained together. */ Builder iamRoleArn(String iamRoleArn); /** *

      * Enables or disables default internet access for the image builder. *

      * * @param enableDefaultInternetAccess * Enables or disables default internet access for the image builder. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enableDefaultInternetAccess(Boolean enableDefaultInternetAccess); /** *

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

      * * @param domainJoinInfo * The name of the directory and organizational unit (OU) to use to join the image builder to a Microsoft * Active Directory domain. * @return Returns a reference to this object so that method calls can be chained together. */ Builder domainJoinInfo(DomainJoinInfo domainJoinInfo); /** *

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

      * This is a convenience that creates an instance of the {@link DomainJoinInfo.Builder} avoiding the need to * create one manually via {@link DomainJoinInfo#builder()}. * * When the {@link Consumer} completes, {@link DomainJoinInfo.Builder#build()} is called immediately and its * result is passed to {@link #domainJoinInfo(DomainJoinInfo)}. * * @param domainJoinInfo * a consumer that will call methods on {@link DomainJoinInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #domainJoinInfo(DomainJoinInfo) */ default Builder domainJoinInfo(Consumer domainJoinInfo) { return domainJoinInfo(DomainJoinInfo.builder().applyMutation(domainJoinInfo).build()); } /** *

      * 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]. *

      * * @param appstreamAgentVersion * 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]. * @return Returns a reference to this object so that method calls can be chained together. */ Builder appstreamAgentVersion(String appstreamAgentVersion); /** *

      * The tags to associate with the image builder. A tag is a key-value pair, and the value is optional. For * example, Environment=Test. If you do not specify a value, Environment=. *

      *

      * Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following * special characters: *

      *

      * _ . : / = + \ - @ *

      *

      * If you do not specify a value, the value is set to an empty string. *

      *

      * For more information about tags, see Tagging Your * Resources in the Amazon AppStream 2.0 Administration Guide. *

      * * @param tags * The tags to associate with the image builder. A tag is a key-value pair, and the value is optional. * For example, Environment=Test. If you do not specify a value, Environment=.

      *

      * Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the * following special characters: *

      *

      * _ . : / = + \ - @ *

      *

      * If you do not specify a value, the value is set to an empty string. *

      *

      * For more information about tags, see Tagging Your * Resources in the Amazon AppStream 2.0 Administration Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Map tags); /** *

      * The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the image * builder only through the specified endpoints. *

      * * @param accessEndpoints * The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the * image builder only through the specified endpoints. * @return Returns a reference to this object so that method calls can be chained together. */ Builder accessEndpoints(Collection accessEndpoints); /** *

      * The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the image * builder only through the specified endpoints. *

      * * @param accessEndpoints * The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the * image builder only through the specified endpoints. * @return Returns a reference to this object so that method calls can be chained together. */ Builder accessEndpoints(AccessEndpoint... accessEndpoints); /** *

      * The list of interface VPC endpoint (interface endpoint) objects. Administrators can connect to the image * builder only through the specified endpoints. *

      * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need * to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and * its result is passed to {@link #accessEndpoints(List)}. * * @param accessEndpoints * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #accessEndpoints(List) */ Builder accessEndpoints(Consumer... accessEndpoints); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends AppStreamRequest.BuilderImpl implements Builder { private String name; private String imageName; private String imageArn; private String instanceType; private String description; private String displayName; private VpcConfig vpcConfig; private String iamRoleArn; private Boolean enableDefaultInternetAccess; private DomainJoinInfo domainJoinInfo; private String appstreamAgentVersion; private Map tags = DefaultSdkAutoConstructMap.getInstance(); private List accessEndpoints = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(CreateImageBuilderRequest model) { super(model); name(model.name); imageName(model.imageName); imageArn(model.imageArn); instanceType(model.instanceType); description(model.description); displayName(model.displayName); vpcConfig(model.vpcConfig); iamRoleArn(model.iamRoleArn); enableDefaultInternetAccess(model.enableDefaultInternetAccess); domainJoinInfo(model.domainJoinInfo); appstreamAgentVersion(model.appstreamAgentVersion); tags(model.tags); accessEndpoints(model.accessEndpoints); } public final String getName() { return name; } @Override public final Builder name(String name) { this.name = name; return this; } public final void setName(String name) { this.name = name; } public final String getImageName() { return imageName; } @Override public final Builder imageName(String imageName) { this.imageName = imageName; return this; } public final void setImageName(String imageName) { this.imageName = imageName; } public final String getImageArn() { return imageArn; } @Override public final Builder imageArn(String imageArn) { this.imageArn = imageArn; return this; } public final void setImageArn(String imageArn) { this.imageArn = imageArn; } public final String getInstanceType() { return instanceType; } @Override public final Builder instanceType(String instanceType) { this.instanceType = instanceType; return this; } public final void setInstanceType(String instanceType) { this.instanceType = instanceType; } public final String getDescription() { return description; } @Override public final Builder description(String description) { this.description = description; return this; } public final void setDescription(String description) { this.description = description; } public final String getDisplayName() { return displayName; } @Override public final Builder displayName(String displayName) { this.displayName = displayName; return this; } public final void setDisplayName(String displayName) { this.displayName = displayName; } public final VpcConfig.Builder getVpcConfig() { return vpcConfig != null ? vpcConfig.toBuilder() : null; } @Override public final Builder vpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; return this; } public final void setVpcConfig(VpcConfig.BuilderImpl vpcConfig) { this.vpcConfig = vpcConfig != null ? vpcConfig.build() : null; } public final String getIamRoleArn() { return iamRoleArn; } @Override public final Builder iamRoleArn(String iamRoleArn) { this.iamRoleArn = iamRoleArn; return this; } public final void setIamRoleArn(String iamRoleArn) { this.iamRoleArn = iamRoleArn; } public final Boolean getEnableDefaultInternetAccess() { return enableDefaultInternetAccess; } @Override public final Builder enableDefaultInternetAccess(Boolean enableDefaultInternetAccess) { this.enableDefaultInternetAccess = enableDefaultInternetAccess; return this; } public final void setEnableDefaultInternetAccess(Boolean enableDefaultInternetAccess) { this.enableDefaultInternetAccess = enableDefaultInternetAccess; } public final DomainJoinInfo.Builder getDomainJoinInfo() { return domainJoinInfo != null ? domainJoinInfo.toBuilder() : null; } @Override public final Builder domainJoinInfo(DomainJoinInfo domainJoinInfo) { this.domainJoinInfo = domainJoinInfo; return this; } public final void setDomainJoinInfo(DomainJoinInfo.BuilderImpl domainJoinInfo) { this.domainJoinInfo = domainJoinInfo != null ? domainJoinInfo.build() : null; } public final String getAppstreamAgentVersion() { return appstreamAgentVersion; } @Override public final Builder appstreamAgentVersion(String appstreamAgentVersion) { this.appstreamAgentVersion = appstreamAgentVersion; return this; } public final void setAppstreamAgentVersion(String appstreamAgentVersion) { this.appstreamAgentVersion = appstreamAgentVersion; } public final Map getTags() { if (tags instanceof SdkAutoConstructMap) { return null; } return tags; } @Override public final Builder tags(Map tags) { this.tags = TagsCopier.copy(tags); return this; } public final void setTags(Map tags) { this.tags = TagsCopier.copy(tags); } public final List getAccessEndpoints() { List result = AccessEndpointListCopier.copyToBuilder(this.accessEndpoints); if (result instanceof SdkAutoConstructList) { return null; } return result; } @Override public final Builder accessEndpoints(Collection accessEndpoints) { this.accessEndpoints = AccessEndpointListCopier.copy(accessEndpoints); return this; } @Override @SafeVarargs public final Builder accessEndpoints(AccessEndpoint... accessEndpoints) { accessEndpoints(Arrays.asList(accessEndpoints)); return this; } @Override @SafeVarargs public final Builder accessEndpoints(Consumer... accessEndpoints) { accessEndpoints(Stream.of(accessEndpoints).map(c -> AccessEndpoint.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setAccessEndpoints(Collection accessEndpoints) { this.accessEndpoints = AccessEndpointListCopier.copyFromBuilder(accessEndpoints); } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public CreateImageBuilderRequest build() { return new CreateImageBuilderRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy