Class: AWSCDK::ACMPCA::CfnCertificate::SubjectProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
acmpca/cfn_certificate.rb

Overview

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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(common_name: nil, country: nil, custom_attributes: nil, distinguished_name_qualifier: nil, generation_qualifier: nil, given_name: nil, initials: nil, locality: nil, organization: nil, organizational_unit: nil, pseudonym: nil, serial_number: nil, state: nil, surname: nil, title: nil) ⇒ SubjectProperty

Returns a new instance of SubjectProperty.

Parameters:

  • common_name (String, nil) (defaults to: nil)

    For CA and end-entity certificates in a private PKI, the common name (CN) can be any string within the length limit.

  • country (String, nil) (defaults to: nil)

    Two-digit code that specifies the country in which the certificate subject located.

  • custom_attributes (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::ACMPCA::CfnCertificate::CustomAttributeProperty>, nil) (defaults to: nil)

    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) .

  • distinguished_name_qualifier (String, nil) (defaults to: nil)

    Disambiguating information for the certificate subject.

  • generation_qualifier (String, nil) (defaults to: nil)

    Typically a qualifier appended to the name of an individual.

  • given_name (String, nil) (defaults to: nil)

    First name.

  • initials (String, nil) (defaults to: nil)

    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 .

  • locality (String, nil) (defaults to: nil)

    The locality (such as a city or town) in which the certificate subject is located.

  • organization (String, nil) (defaults to: nil)

    Legal name of the organization with which the certificate subject is affiliated.

  • organizational_unit (String, nil) (defaults to: nil)

    A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.

  • pseudonym (String, nil) (defaults to: nil)

    Typically a shortened version of a longer GivenName .

  • serial_number (String, nil) (defaults to: nil)

    The certificate serial number.

  • state (String, nil) (defaults to: nil)

    State in which the subject of the certificate is located.

  • surname (String, nil) (defaults to: nil)

    Family name.

  • title (String, nil) (defaults to: nil)

    A title such as Mr.



1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
# File 'acmpca/cfn_certificate.rb', line 1327

def initialize(common_name: nil, country: nil, custom_attributes: nil, distinguished_name_qualifier: nil, generation_qualifier: nil, given_name: nil, initials: nil, locality: nil, organization: nil, organizational_unit: nil, pseudonym: nil, serial_number: nil, state: nil, surname: nil, title: nil)
  @common_name = common_name
  Jsii::Type.check_type(@common_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "commonName") unless @common_name.nil?
  @country = country
  Jsii::Type.check_type(@country, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "country") unless @country.nil?
  @custom_attributes = custom_attributes
  Jsii::Type.check_type(@custom_attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYWNtcGNhLkNmbkNlcnRpZmljYXRlLkN1c3RvbUF0dHJpYnV0ZVByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "customAttributes") unless @custom_attributes.nil?
  @distinguished_name_qualifier = distinguished_name_qualifier
  Jsii::Type.check_type(@distinguished_name_qualifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "distinguishedNameQualifier") unless @distinguished_name_qualifier.nil?
  @generation_qualifier = generation_qualifier
  Jsii::Type.check_type(@generation_qualifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "generationQualifier") unless @generation_qualifier.nil?
  @given_name = given_name
  Jsii::Type.check_type(@given_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "givenName") unless @given_name.nil?
  @initials = initials
  Jsii::Type.check_type(@initials, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "initials") unless @initials.nil?
  @locality = locality
  Jsii::Type.check_type(@locality, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "locality") unless @locality.nil?
  @organization = organization
  Jsii::Type.check_type(@organization, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "organization") unless @organization.nil?
  @organizational_unit = organizational_unit
  Jsii::Type.check_type(@organizational_unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "organizationalUnit") unless @organizational_unit.nil?
  @pseudonym = pseudonym
  Jsii::Type.check_type(@pseudonym, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "pseudonym") unless @pseudonym.nil?
  @serial_number = serial_number
  Jsii::Type.check_type(@serial_number, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serialNumber") unless @serial_number.nil?
  @state = state
  Jsii::Type.check_type(@state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "state") unless @state.nil?
  @surname = surname
  Jsii::Type.check_type(@surname, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "surname") unless @surname.nil?
  @title = title
  Jsii::Type.check_type(@title, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "title") unless @title.nil?
end

Instance Attribute Details

#common_nameString? (readonly)

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.



1366
1367
1368
# File 'acmpca/cfn_certificate.rb', line 1366

def common_name
  @common_name
end

#countryString? (readonly)

Two-digit code that specifies the country in which the certificate subject located.



1371
1372
1373
# File 'acmpca/cfn_certificate.rb', line 1371

def country
  @country
end

#custom_attributesAWSCDK::IResolvable, ... (readonly)

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.



1378
1379
1380
# File 'acmpca/cfn_certificate.rb', line 1378

def custom_attributes
  @custom_attributes
end

#distinguished_name_qualifierString? (readonly)

Disambiguating information for the certificate subject.



1383
1384
1385
# File 'acmpca/cfn_certificate.rb', line 1383

def distinguished_name_qualifier
  @distinguished_name_qualifier
end

#generation_qualifierString? (readonly)

Typically a qualifier appended to the name of an individual.

Examples include Jr. for junior, Sr. for senior, and III for third.



1390
1391
1392
# File 'acmpca/cfn_certificate.rb', line 1390

def generation_qualifier
  @generation_qualifier
end

#given_nameString? (readonly)

First name.



1395
1396
1397
# File 'acmpca/cfn_certificate.rb', line 1395

def given_name
  @given_name
end

#initialsString? (readonly)

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 .



1400
1401
1402
# File 'acmpca/cfn_certificate.rb', line 1400

def initials
  @initials
end

#localityString? (readonly)

The locality (such as a city or town) in which the certificate subject is located.



1405
1406
1407
# File 'acmpca/cfn_certificate.rb', line 1405

def locality
  @locality
end

#organizationString? (readonly)

Legal name of the organization with which the certificate subject is affiliated.



1410
1411
1412
# File 'acmpca/cfn_certificate.rb', line 1410

def organization
  @organization
end

#organizational_unitString? (readonly)

A subdivision or unit of the organization (such as sales or finance) with which the certificate subject is affiliated.



1415
1416
1417
# File 'acmpca/cfn_certificate.rb', line 1415

def organizational_unit
  @organizational_unit
end

#pseudonymString? (readonly)

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.



1422
1423
1424
# File 'acmpca/cfn_certificate.rb', line 1422

def pseudonym
  @pseudonym
end

#serial_numberString? (readonly)

The certificate serial number.



1427
1428
1429
# File 'acmpca/cfn_certificate.rb', line 1427

def serial_number
  @serial_number
end

#stateString? (readonly)

State in which the subject of the certificate is located.



1432
1433
1434
# File 'acmpca/cfn_certificate.rb', line 1432

def state
  @state
end

#surnameString? (readonly)

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.



1439
1440
1441
# File 'acmpca/cfn_certificate.rb', line 1439

def surname
  @surname
end

#titleString? (readonly)

A title such as Mr.

or Ms., which is pre-pended to the name to refer formally to the certificate subject.



1446
1447
1448
# File 'acmpca/cfn_certificate.rb', line 1446

def title
  @title
end

Class Method Details

.jsii_propertiesObject



1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
# File 'acmpca/cfn_certificate.rb', line 1448

def self.jsii_properties
  {
    :common_name => "commonName",
    :country => "country",
    :custom_attributes => "customAttributes",
    :distinguished_name_qualifier => "distinguishedNameQualifier",
    :generation_qualifier => "generationQualifier",
    :given_name => "givenName",
    :initials => "initials",
    :locality => "locality",
    :organization => "organization",
    :organizational_unit => "organizationalUnit",
    :pseudonym => "pseudonym",
    :serial_number => "serialNumber",
    :state => "state",
    :surname => "surname",
    :title => "title",
  }
end

Instance Method Details

#to_jsiiObject



1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
# File 'acmpca/cfn_certificate.rb', line 1468

def to_jsii
  result = {}
  result.merge!({
    "commonName" => @common_name,
    "country" => @country,
    "customAttributes" => @custom_attributes,
    "distinguishedNameQualifier" => @distinguished_name_qualifier,
    "generationQualifier" => @generation_qualifier,
    "givenName" => @given_name,
    "initials" => @initials,
    "locality" => @locality,
    "organization" => @organization,
    "organizationalUnit" => @organizational_unit,
    "pseudonym" => @pseudonym,
    "serialNumber" => @serial_number,
    "state" => @state,
    "surname" => @surname,
    "title" => @title,
  })
  result.compact
end