Class Stack
- java.lang.Object
-
- software.amazon.awssdk.services.opsworks.model.Stack
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Stack.Builder,Stack>
@Generated("software.amazon.awssdk:codegen") public final class Stack extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Stack.Builder,Stack>
Describes a stack.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceStack.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringagentVersion()The agent version.Stringarn()The stack's ARN.Map<StackAttributesKeys,String>attributes()The stack's attributes.Map<String,String>attributesAsStrings()The stack's attributes.static Stack.Builderbuilder()ChefConfigurationchefConfiguration()AChefConfigurationobject that specifies whether to enable Berkshelf and the Berkshelf version.StackConfigurationManagerconfigurationManager()The configuration manager.StringcreatedAt()The date when the stack was created.SourcecustomCookbooksSource()Contains the information required to retrieve an app or cookbook from a repository.StringcustomJson()A JSON object that contains user-defined attributes to be added to the stack configuration and deployment attributes.StringdefaultAvailabilityZone()The stack's default Availability Zone.StringdefaultInstanceProfileArn()The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances.StringdefaultOs()The stack's default operating system.RootDeviceTypedefaultRootDeviceType()The default root device type.StringdefaultRootDeviceTypeAsString()The default root device type.StringdefaultSshKeyName()A default Amazon EC2 key pair for the stack's instances.StringdefaultSubnetId()The default subnet ID; applicable only if the stack is running in a VPC.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasAttributes()For responses, this returns true if the service returned a value for the Attributes property.inthashCode()StringhostnameTheme()The stack host name theme, with spaces replaced by underscores.Stringname()The stack name.Stringregion()The stack AWS region, such as "ap-northeast-2".List<SdkField<?>>sdkFields()static Class<? extends Stack.Builder>serializableBuilderClass()StringserviceRoleArn()The stack AWS Identity and Access Management (IAM) role.StringstackId()The stack ID.Stack.BuildertoBuilder()StringtoString()Returns a string representation of this object.BooleanuseCustomCookbooks()Whether the stack uses custom cookbooks.BooleanuseOpsworksSecurityGroups()Whether the stack automatically associates the AWS OpsWorks Stacks built-in security groups with the stack's layers.StringvpcId()The VPC ID; applicable only if the stack is running in a VPC.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
stackId
public final String stackId()
The stack ID.
- Returns:
- The stack ID.
-
name
public final String name()
The stack name.
- Returns:
- The stack name.
-
arn
public final String arn()
The stack's ARN.
- Returns:
- The stack's ARN.
-
region
public final String region()
The stack AWS region, such as "ap-northeast-2". For more information about AWS regions, see Regions and Endpoints.
- Returns:
- The stack AWS region, such as "ap-northeast-2". For more information about AWS regions, see Regions and Endpoints.
-
vpcId
public final String vpcId()
The VPC ID; applicable only if the stack is running in a VPC.
- Returns:
- The VPC ID; applicable only if the stack is running in a VPC.
-
attributes
public final Map<StackAttributesKeys,String> attributes()
The stack's attributes.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAttributes()method.- Returns:
- The stack's attributes.
-
hasAttributes
public final boolean hasAttributes()
For responses, this returns true if the service returned a value for the Attributes property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
attributesAsStrings
public final Map<String,String> attributesAsStrings()
The stack's attributes.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAttributes()method.- Returns:
- The stack's attributes.
-
serviceRoleArn
public final String serviceRoleArn()
The stack AWS Identity and Access Management (IAM) role.
- Returns:
- The stack AWS Identity and Access Management (IAM) role.
-
defaultInstanceProfileArn
public final String defaultInstanceProfileArn()
The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
- Returns:
- The ARN of an IAM profile that is the default profile for all of the stack's EC2 instances. For more information about IAM ARNs, see Using Identifiers.
-
defaultOs
public final String defaultOs()
The stack's default operating system.
- Returns:
- The stack's default operating system.
-
hostnameTheme
public final String hostnameTheme()
The stack host name theme, with spaces replaced by underscores.
- Returns:
- The stack host name theme, with spaces replaced by underscores.
-
defaultAvailabilityZone
public final String defaultAvailabilityZone()
The stack's default Availability Zone. For more information, see Regions and Endpoints.
- Returns:
- The stack's default Availability Zone. For more information, see Regions and Endpoints.
-
defaultSubnetId
public final String defaultSubnetId()
The default subnet ID; applicable only if the stack is running in a VPC.
- Returns:
- The default subnet ID; applicable only if the stack is running in a VPC.
-
customJson
public final String customJson()
A JSON object that contains user-defined attributes to be added to the stack configuration and deployment attributes. You can use custom JSON to override the corresponding default stack configuration attribute values or to pass data to recipes. The string should be in the following format:
"{\"key1\": \"value1\", \"key2\": \"value2\",...}"For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.
- Returns:
- A JSON object that contains user-defined attributes to be added to the stack configuration and deployment
attributes. You can use custom JSON to override the corresponding default stack configuration attribute
values or to pass data to recipes. The string should be in the following format:
"{\"key1\": \"value1\", \"key2\": \"value2\",...}"For more information on custom JSON, see Use Custom JSON to Modify the Stack Configuration Attributes.
-
configurationManager
public final StackConfigurationManager configurationManager()
The configuration manager.
- Returns:
- The configuration manager.
-
chefConfiguration
public final ChefConfiguration chefConfiguration()
A
ChefConfigurationobject that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.- Returns:
- A
ChefConfigurationobject that specifies whether to enable Berkshelf and the Berkshelf version. For more information, see Create a New Stack.
-
useCustomCookbooks
public final Boolean useCustomCookbooks()
Whether the stack uses custom cookbooks.
- Returns:
- Whether the stack uses custom cookbooks.
-
useOpsworksSecurityGroups
public final Boolean useOpsworksSecurityGroups()
Whether the stack automatically associates the AWS OpsWorks Stacks built-in security groups with the stack's layers.
- Returns:
- Whether the stack automatically associates the AWS OpsWorks Stacks built-in security groups with the stack's layers.
-
customCookbooksSource
public final Source customCookbooksSource()
Contains the information required to retrieve an app or cookbook from a repository. For more information, see Adding Apps or Cookbooks and Recipes.
- Returns:
- Contains the information required to retrieve an app or cookbook from a repository. For more information, see Adding Apps or Cookbooks and Recipes.
-
defaultSshKeyName
public final String defaultSshKeyName()
A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.
- Returns:
- A default Amazon EC2 key pair for the stack's instances. You can override this value when you create or update an instance.
-
createdAt
public final String createdAt()
The date when the stack was created.
- Returns:
- The date when the stack was created.
-
defaultRootDeviceType
public final RootDeviceType defaultRootDeviceType()
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
If the service returns an enum value that is not available in the current SDK version,
defaultRootDeviceTypewill returnRootDeviceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromdefaultRootDeviceTypeAsString().- Returns:
- The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
- See Also:
RootDeviceType
-
defaultRootDeviceTypeAsString
public final String defaultRootDeviceTypeAsString()
The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
If the service returns an enum value that is not available in the current SDK version,
defaultRootDeviceTypewill returnRootDeviceType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromdefaultRootDeviceTypeAsString().- Returns:
- The default root device type. This value is used by default for all instances in the stack, but you can override it when you create an instance. For more information, see Storage for the Root Device.
- See Also:
RootDeviceType
-
agentVersion
public final String agentVersion()
The agent version. This parameter is set to
LATESTfor auto-update. or a version number for a fixed agent version.- Returns:
- The agent version. This parameter is set to
LATESTfor auto-update. or a version number for a fixed agent version.
-
toBuilder
public Stack.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Stack.Builder,Stack>
-
builder
public static Stack.Builder builder()
-
serializableBuilderClass
public static Class<? extends Stack.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
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.
-
-