Class Subdomain
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Subdomain.Builder,Subdomain>
Describes a Lightsail subdomain. A subdomain is the name that you choose, such as mysite or
blog.mysite. Its web address is the subdomain followed by amazonlightsail.com, such as
blog.mysite.amazonlightsail.com. You can associate a subdomain with a Lightsail resource to make the
resource reachable at the web address.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringarn()The Amazon Resource Name (ARN) of the subdomain.An object that describes the resource that the subdomain is associated with.An object that describes the resource that the subdomain is being associated with.static Subdomain.Builderbuilder()children()An array of objects that describe the nested subdomains of the subdomain.final InstantThe timestamp when the subdomain was created.final Integerdepth()The number of labels in the subdomain.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final Stringfqdn()The web address of the subdomain, which is the subdomain followed byamazonlightsail.com(for example,blog.mysite.amazonlightsail.com).final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the Children property.final inthashCode()final booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.final ResourceLocationlocation()An object that describes the location of the subdomain, such as the AWS Region.final StringThe web address of the parent subdomain (for example,mysite.amazonlightsail.comforblog.mysite).static Class<? extends Subdomain.Builder> final SubdomainStatestate()The state of the subdomain.final StringThe state of the subdomain.final StringThe subdomain (for example,mysiteorblog.mysite).tags()The tag keys and optional values for the subdomain.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
subdomainName
The subdomain (for example,
mysiteorblog.mysite). To get the web address, use thefqdnparameter.- Returns:
- The subdomain (for example,
mysiteorblog.mysite). To get the web address, use thefqdnparameter.
-
arn
The Amazon Resource Name (ARN) of the subdomain.
If you create a subdomain with a depth of 2, such as
blog.mysite, without first creating the subdomain with a depth of 1 (mysite), Lightsail holdsmysitefor your account in theIMPLICITstate. It doesn't have an ARN until you create a subdomain with that name.- Returns:
- The Amazon Resource Name (ARN) of the subdomain.
If you create a subdomain with a depth of 2, such as
blog.mysite, without first creating the subdomain with a depth of 1 (mysite), Lightsail holdsmysitefor your account in theIMPLICITstate. It doesn't have an ARN until you create a subdomain with that name.
-
fqdn
The web address of the subdomain, which is the subdomain followed by
amazonlightsail.com(for example,blog.mysite.amazonlightsail.com).- Returns:
- The web address of the subdomain, which is the subdomain followed by
amazonlightsail.com(for example,blog.mysite.amazonlightsail.com).
-
depth
The number of labels in the subdomain. A top-level subdomain, such as
mysite, has a depth of1. A nested subdomain, such asblog.mysite, has a depth of2.- Returns:
- The number of labels in the subdomain. A top-level subdomain, such as
mysite, has a depth of1. A nested subdomain, such asblog.mysite, has a depth of2.
-
state
The state of the subdomain.
The following states are possible:
-
CREATING– The subdomain is being created. -
CREATE_FAILED– The subdomain couldn't be created. Delete the subdomain, and then create it again if the name is still available. -
UNATTACHED– The subdomain is ready, and isn't associated with a resource. -
ATTACHING– The subdomain is being associated with a resource. -
ATTACHED– The subdomain is associated with a resource, and routes traffic to it. -
DETACHING– The subdomain is being disassociated from a resource. -
TRANSFERRING– The subdomain is being moved from one resource to another resource. -
IMPLICIT– The subdomain is the parent of one or more nested subdomains that you created, but you didn't create the parent subdomain itself. You can't associate or delete a subdomain in this state. To use it, create it with theCreateSubdomainaction.
If the service returns an enum value that is not available in the current SDK version,
statewill returnSubdomainState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The state of the subdomain.
The following states are possible:
-
CREATING– The subdomain is being created. -
CREATE_FAILED– The subdomain couldn't be created. Delete the subdomain, and then create it again if the name is still available. -
UNATTACHED– The subdomain is ready, and isn't associated with a resource. -
ATTACHING– The subdomain is being associated with a resource. -
ATTACHED– The subdomain is associated with a resource, and routes traffic to it. -
DETACHING– The subdomain is being disassociated from a resource. -
TRANSFERRING– The subdomain is being moved from one resource to another resource. -
IMPLICIT– The subdomain is the parent of one or more nested subdomains that you created, but you didn't create the parent subdomain itself. You can't associate or delete a subdomain in this state. To use it, create it with theCreateSubdomainaction.
-
- See Also:
-
-
stateAsString
The state of the subdomain.
The following states are possible:
-
CREATING– The subdomain is being created. -
CREATE_FAILED– The subdomain couldn't be created. Delete the subdomain, and then create it again if the name is still available. -
UNATTACHED– The subdomain is ready, and isn't associated with a resource. -
ATTACHING– The subdomain is being associated with a resource. -
ATTACHED– The subdomain is associated with a resource, and routes traffic to it. -
DETACHING– The subdomain is being disassociated from a resource. -
TRANSFERRING– The subdomain is being moved from one resource to another resource. -
IMPLICIT– The subdomain is the parent of one or more nested subdomains that you created, but you didn't create the parent subdomain itself. You can't associate or delete a subdomain in this state. To use it, create it with theCreateSubdomainaction.
If the service returns an enum value that is not available in the current SDK version,
statewill returnSubdomainState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstateAsString().- Returns:
- The state of the subdomain.
The following states are possible:
-
CREATING– The subdomain is being created. -
CREATE_FAILED– The subdomain couldn't be created. Delete the subdomain, and then create it again if the name is still available. -
UNATTACHED– The subdomain is ready, and isn't associated with a resource. -
ATTACHING– The subdomain is being associated with a resource. -
ATTACHED– The subdomain is associated with a resource, and routes traffic to it. -
DETACHING– The subdomain is being disassociated from a resource. -
TRANSFERRING– The subdomain is being moved from one resource to another resource. -
IMPLICIT– The subdomain is the parent of one or more nested subdomains that you created, but you didn't create the parent subdomain itself. You can't associate or delete a subdomain in this state. To use it, create it with theCreateSubdomainaction.
-
- See Also:
-
-
attachedResource
An object that describes the resource that the subdomain is associated with.
When the subdomain is in the
TRANSFERRINGstate, this is the resource that the subdomain is being moved from.- Returns:
- An object that describes the resource that the subdomain is associated with.
When the subdomain is in the
TRANSFERRINGstate, this is the resource that the subdomain is being moved from.
-
attachingResource
An object that describes the resource that the subdomain is being associated with.
This parameter is returned only when the subdomain is in the
ATTACHINGorTRANSFERRINGstate.- Returns:
- An object that describes the resource that the subdomain is being associated with.
This parameter is returned only when the subdomain is in the
ATTACHINGorTRANSFERRINGstate.
-
location
An object that describes the location of the subdomain, such as the AWS Region.
- Returns:
- An object that describes the location of the subdomain, such as the AWS Region.
-
createdAt
The timestamp when the subdomain was created.
- Returns:
- The timestamp when the subdomain was created.
-
parentFqdn
The web address of the parent subdomain (for example,
mysite.amazonlightsail.comforblog.mysite).This parameter isn't returned for a subdomain with a depth of 1.
- Returns:
- The web address of the parent subdomain (for example,
mysite.amazonlightsail.comforblog.mysite).This parameter isn't returned for a subdomain with a depth of 1.
-
hasChildren
public final boolean hasChildren()For responses, this returns true if the service returned a value for the Children 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. -
children
An array of objects that describe the nested subdomains of the subdomain.
This parameter is returned only by the
GetSubdomainsaction when you don't specify a subdomain.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
hasChildren()method.- Returns:
- An array of objects that describe the nested subdomains of the subdomain.
This parameter is returned only by the
GetSubdomainsaction when you don't specify a subdomain.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags 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. -
tags
The tag keys and optional values for the subdomain. For more information about tags in Lightsail, see the Lightsail Developer Guide.
This parameter is returned only by the
GetSubdomainsaction when you specify a subdomain.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
hasTags()method.- Returns:
- The tag keys and optional values for the subdomain. For more information about tags in Lightsail, see the
Lightsail
Developer Guide.
This parameter is returned only by the
GetSubdomainsaction when you specify a subdomain.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Subdomain.Builder,Subdomain> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-