Class ASN1Subject
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<ASN1Subject.Builder,
ASN1Subject>
Contains information about the certificate subject. The Subject
field in the certificate identifies the
entity that owns or controls the public key in the certificate. The entity can be a user, computer, device, or
service. The Subject
must contain an X.500 distinguished name (DN). A DN is a sequence of relative
distinguished names (RDNs). The RDNs are separated by commas in the certificate.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ASN1Subject.Builder
builder()
final String
For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.final String
country()
Two-digit code that specifies the country in which the certificate subject located.final List
<CustomAttribute> final String
Disambiguating information for the certificate subject.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final String
Typically a qualifier appended to the name of an individual.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final String
First name.final boolean
For responses, this returns true if the service returned a value for the CustomAttributes property.final int
hashCode()
final String
initials()
Concatenation that typically contains the first letter of the GivenName, the first letter of the middle name if one exists, and the first letter of the Surname.final String
locality()
The locality (such as a city or town) in which the certificate subject is located.final String
Legal name of the organization with which the certificate subject is affiliated.final String
A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.final String
Typically a shortened version of a longer GivenName.static Class
<? extends ASN1Subject.Builder> final String
The certificate serial number.final String
state()
State in which the subject of the certificate is located.final String
surname()
Family name.final String
title()
A title such as Mr.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
country
Two-digit code that specifies the country in which the certificate subject located.
- Returns:
- Two-digit code that specifies the country in which the certificate subject located.
-
organization
Legal name of the organization with which the certificate subject is affiliated.
- Returns:
- Legal name of the organization with which the certificate subject is affiliated.
-
organizationalUnit
A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.
- Returns:
- A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.
-
distinguishedNameQualifier
Disambiguating information for the certificate subject.
- Returns:
- Disambiguating information for the certificate subject.
-
state
State in which the subject of the certificate is located.
- Returns:
- State in which the subject of the certificate is located.
-
commonName
For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.
Note: In publicly trusted certificates, the common name must be a fully qualified domain name (FQDN) associated with the certificate subject.
- Returns:
- For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the
length limit.
Note: In publicly trusted certificates, the common name must be a fully qualified domain name (FQDN) associated with the certificate subject.
-
serialNumber
The certificate serial number.
- Returns:
- The certificate serial number.
-
locality
The locality (such as a city or town) in which the certificate subject is located.
- Returns:
- The locality (such as a city or town) in which the certificate subject is located.
-
title
A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject.
- Returns:
- A title such as Mr. or Ms., which is pre-pended to the name to refer formally to the certificate subject.
-
surname
Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first.
- Returns:
- Family name. In the US and the UK, for example, the surname of an individual is ordered last. In Asian cultures the surname is typically ordered first.
-
givenName
First name.
- Returns:
- First name.
-
initials
Concatenation that typically contains the first letter of the GivenName, the first letter of the middle name if one exists, and the first letter of the Surname.
- Returns:
- Concatenation that typically contains the first letter of the GivenName, the first letter of the middle name if one exists, and the first letter of the Surname.
-
pseudonym
Typically a shortened version of a longer GivenName. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza.
- Returns:
- Typically a shortened version of a longer GivenName. For example, Jonathan is often shortened to John. Elizabeth is often shortened to Beth, Liz, or Eliza.
-
generationQualifier
Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third.
- Returns:
- Typically a qualifier appended to the name of an individual. Examples include Jr. for junior, Sr. for senior, and III for third.
-
hasCustomAttributes
public final boolean hasCustomAttributes()For responses, this returns true if the service returned a value for the CustomAttributes 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. -
customAttributes
Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of which consists of an object identifier (OID) and a value. For more information, see NIST’s definition of Object Identifier (OID).
Custom attributes cannot be used in combination with standard 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
hasCustomAttributes()
method.- Returns:
Contains a sequence of one or more X.500 relative distinguished names (RDNs), each of which consists of an object identifier (OID) and a value. For more information, see NIST’s definition of Object Identifier (OID).
Custom attributes cannot be used in combination with standard attributes.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<ASN1Subject.Builder,
ASN1Subject> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in 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
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. -
getValueForField
-
sdkFields
-