blib/lib/Paws/ACMPCA/IssueCertificate.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::ACMPCA::IssueCertificate;
3 use Moose;
4 has ApiPassthrough => (is => 'ro', isa => 'Paws::ACMPCA::ApiPassthrough');
5 has CertificateAuthorityArn => (is => 'ro', isa => 'Str', required => 1);
6 has Csr => (is => 'ro', isa => 'Str', required => 1);
7 has IdempotencyToken => (is => 'ro', isa => 'Str');
8 has SigningAlgorithm => (is => 'ro', isa => 'Str', required => 1);
9 has TemplateArn => (is => 'ro', isa => 'Str');
10 has Validity => (is => 'ro', isa => 'Paws::ACMPCA::Validity', required => 1);
11 has ValidityNotBefore => (is => 'ro', isa => 'Paws::ACMPCA::Validity');
12  
13 use MooseX::ClassAttribute;
14  
15 class_has _api_call => (isa => 'Str', is => 'ro', default => 'IssueCertificate');
16 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ACMPCA::IssueCertificateResponse');
17 class_has _result_key => (isa => 'Str', is => 'ro');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::ACMPCA::IssueCertificate - Arguments for method IssueCertificate on L<Paws::ACMPCA>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method IssueCertificate on the
29 L<AWS Certificate Manager Private Certificate Authority|Paws::ACMPCA> service. Use the attributes of this class
30 as arguments to method IssueCertificate.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to IssueCertificate.
33  
34 =head1 SYNOPSIS
35  
36 my $acm-pca = Paws->service('ACMPCA');
37 my $IssueCertificateResponse = $acm -pca->IssueCertificate(
38 CertificateAuthorityArn => 'MyArn',
39 Csr => 'BlobCsrBlob',
40 SigningAlgorithm => 'SHA256WITHECDSA',
41 Validity => {
42 Type => 'END_DATE', # values: END_DATE, ABSOLUTE, DAYS, MONTHS, YEARS
43 Value => 1, # min: 1
44  
45 },
46 ApiPassthrough => {
47 Extensions => {
48 CertificatePolicies => [
49 {
50 CertPolicyId => 'MyCustomObjectIdentifier', # max: 64
51 PolicyQualifiers => [
52 {
53 PolicyQualifierId => 'CPS', # values: CPS
54 Qualifier => {
55 CpsUri => 'MyString256', # max: 256
56  
57 },
58  
59 },
60 ...
61 ], # min: 1, max: 20; OPTIONAL
62 },
63 ...
64 ], # min: 1, max: 20; OPTIONAL
65 ExtendedKeyUsage => [
66 {
67 ExtendedKeyUsageObjectIdentifier =>
68 'MyCustomObjectIdentifier', # max: 64
69 ExtendedKeyUsageType => 'SERVER_AUTH'
70 , # values: SERVER_AUTH, CLIENT_AUTH, CODE_SIGNING, EMAIL_PROTECTION, TIME_STAMPING, OCSP_SIGNING, SMART_CARD_LOGIN, DOCUMENT_SIGNING, CERTIFICATE_TRANSPARENCY; OPTIONAL
71 },
72 ...
73 ], # min: 1, max: 20; OPTIONAL
74 KeyUsage => {
75 CRLSign => 1, # OPTIONAL
76 DataEncipherment => 1, # OPTIONAL
77 DecipherOnly => 1, # OPTIONAL
78 DigitalSignature => 1, # OPTIONAL
79 EncipherOnly => 1, # OPTIONAL
80 KeyAgreement => 1, # OPTIONAL
81 KeyCertSign => 1, # OPTIONAL
82 KeyEncipherment => 1, # OPTIONAL
83 NonRepudiation => 1, # OPTIONAL
84 }, # OPTIONAL
85 SubjectAlternativeNames => [
86 {
87 DirectoryName => {
88 CommonName => 'MyString64', # max: 64; OPTIONAL
89 Country => 'MyCountryCodeString', # min: 2, max: 2; OPTIONAL
90 DistinguishedNameQualifier =>
91 'MyASN1PrintableString64', # max: 64; OPTIONAL
92 GenerationQualifier => 'MyString3', # max: 3; OPTIONAL
93 GivenName => 'MyString16', # max: 16; OPTIONAL
94 Initials => 'MyString5', # max: 5; OPTIONAL
95 Locality => 'MyString128', # max: 128; OPTIONAL
96 Organization => 'MyString64', # max: 64; OPTIONAL
97 OrganizationalUnit => 'MyString64', # max: 64; OPTIONAL
98 Pseudonym => 'MyString128', # max: 128; OPTIONAL
99 SerialNumber => 'MyASN1PrintableString64', # max: 64; OPTIONAL
100 State => 'MyString128', # max: 128; OPTIONAL
101 Surname => 'MyString40', # max: 40; OPTIONAL
102 Title => 'MyString64', # max: 64; OPTIONAL
103 }, # OPTIONAL
104 DnsName => 'MyString253', # max: 253; OPTIONAL
105 EdiPartyName => {
106 PartyName => 'MyString256', # max: 256
107 NameAssigner => 'MyString256', # max: 256
108 }, # OPTIONAL
109 IpAddress => 'MyString39', # max: 39; OPTIONAL
110 OtherName => {
111 TypeId => 'MyCustomObjectIdentifier', # max: 64
112 Value => 'MyString256', # max: 256
113  
114 }, # OPTIONAL
115 RegisteredId => 'MyCustomObjectIdentifier', # max: 64
116 Rfc822Name => 'MyString256', # max: 256
117 UniformResourceIdentifier => 'MyString253', # max: 253; OPTIONAL
118 },
119 ...
120 ], # min: 1, max: 20; OPTIONAL
121 }, # OPTIONAL
122 Subject => {
123 CommonName => 'MyString64', # max: 64; OPTIONAL
124 Country => 'MyCountryCodeString', # min: 2, max: 2; OPTIONAL
125 DistinguishedNameQualifier =>
126 'MyASN1PrintableString64', # max: 64; OPTIONAL
127 GenerationQualifier => 'MyString3', # max: 3; OPTIONAL
128 GivenName => 'MyString16', # max: 16; OPTIONAL
129 Initials => 'MyString5', # max: 5; OPTIONAL
130 Locality => 'MyString128', # max: 128; OPTIONAL
131 Organization => 'MyString64', # max: 64; OPTIONAL
132 OrganizationalUnit => 'MyString64', # max: 64; OPTIONAL
133 Pseudonym => 'MyString128', # max: 128; OPTIONAL
134 SerialNumber => 'MyASN1PrintableString64', # max: 64; OPTIONAL
135 State => 'MyString128', # max: 128; OPTIONAL
136 Surname => 'MyString40', # max: 40; OPTIONAL
137 Title => 'MyString64', # max: 64; OPTIONAL
138 }, # OPTIONAL
139 }, # OPTIONAL
140 IdempotencyToken => 'MyIdempotencyToken', # OPTIONAL
141 TemplateArn => 'MyArn', # OPTIONAL
142 ValidityNotBefore => {
143 Type => 'END_DATE', # values: END_DATE, ABSOLUTE, DAYS, MONTHS, YEARS
144 Value => 1, # min: 1
145  
146 }, # OPTIONAL
147 );
148  
149 # Results:
150 my $CertificateArn = $IssueCertificateResponse->CertificateArn;
151  
152 # Returns a L<Paws::ACMPCA::IssueCertificateResponse> object.
153  
154 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
155 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/acm-pca/IssueCertificate>
156  
157 =head1 ATTRIBUTES
158  
159  
160 =head2 ApiPassthrough => L<Paws::ACMPCA::ApiPassthrough>
161  
162 Specifies X.509 certificate information to be included in the issued
163 certificate. An C<APIPassthrough> or C<APICSRPassthrough> template
164 variant must be selected, or else this parameter is ignored. For more
165 information about using these templates, see Understanding Certificate
166 Templates
167 (https://docs.aws.amazon.com/acm-pca/latest/userguide/UsingTemplates.html).
168  
169 If conflicting or duplicate certificate information is supplied during
170 certificate issuance, ACM Private CA applies order of operation rules
171 (https://docs.aws.amazon.com/acm-pca/latest/userguide/UsingTemplates.html#template-order-of-operations)
172 to determine what information is used.
173  
174  
175  
176 =head2 B<REQUIRED> CertificateAuthorityArn => Str
177  
178 The Amazon Resource Name (ARN) that was returned when you called
179 CreateCertificateAuthority
180 (https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_CreateCertificateAuthority.html).
181 This must be of the form:
182  
183 C<arn:aws:acm-pca:I<region>:I<account>:certificate-authority/I<12345678-1234-1234-1234-123456789012>>
184  
185  
186  
187 =head2 B<REQUIRED> Csr => Str
188  
189 The certificate signing request (CSR) for the certificate you want to
190 issue. As an example, you can use the following OpenSSL command to
191 create the CSR and a 2048 bit RSA private key.
192  
193 C<openssl req -new -newkey rsa:2048 -days 365 -keyout
194 private/test_cert_priv_key.pem -out csr/test_cert_.csr>
195  
196 If you have a configuration file, you can then use the following
197 OpenSSL command. The C<usr_cert> block in the configuration file
198 contains your X509 version 3 extensions.
199  
200 C<openssl req -new -config openssl_rsa.cnf -extensions usr_cert -newkey
201 rsa:2048 -days -365 -keyout private/test_cert_priv_key.pem -out
202 csr/test_cert_.csr>
203  
204 Note: A CSR must provide either a I<subject name> or a I<subject
205 alternative name> or the request will be rejected.
206  
207  
208  
209 =head2 IdempotencyToken => Str
210  
211 Alphanumeric string that can be used to distinguish between calls to
212 the B<IssueCertificate> action. Idempotency tokens for
213 B<IssueCertificate> time out after one minute. Therefore, if you call
214 B<IssueCertificate> multiple times with the same idempotency token
215 within one minute, ACM Private CA recognizes that you are requesting
216 only one certificate and will issue only one. If you change the
217 idempotency token for each call, PCA recognizes that you are requesting
218 multiple certificates.
219  
220  
221  
222 =head2 B<REQUIRED> SigningAlgorithm => Str
223  
224 The name of the algorithm that will be used to sign the certificate to
225 be issued.
226  
227 This parameter should not be confused with the C<SigningAlgorithm>
228 parameter used to sign a CSR in the C<CreateCertificateAuthority>
229 action.
230  
231 Valid values are: C<"SHA256WITHECDSA">, C<"SHA384WITHECDSA">, C<"SHA512WITHECDSA">, C<"SHA256WITHRSA">, C<"SHA384WITHRSA">, C<"SHA512WITHRSA">
232  
233 =head2 TemplateArn => Str
234  
235 Specifies a custom configuration template to use when issuing a
236 certificate. If this parameter is not provided, ACM Private CA defaults
237 to the C<EndEntityCertificate/V1> template. For CA certificates, you
238 should choose the shortest path length that meets your needs. The path
239 length is indicated by the PathLenI<N> portion of the ARN, where I<N>
240 is the CA depth
241 (https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaTerms.html#terms-cadepth).
242  
243 Note: The CA depth configured on a subordinate CA certificate must not
244 exceed the limit set by its parents in the CA hierarchy.
245  
246 For a list of C<TemplateArn> values supported by ACM Private CA, see
247 Understanding Certificate Templates
248 (https://docs.aws.amazon.com/acm-pca/latest/userguide/UsingTemplates.html).
249  
250  
251  
252 =head2 B<REQUIRED> Validity => L<Paws::ACMPCA::Validity>
253  
254 Information describing the end of the validity period of the
255 certificate. This parameter sets the E<ldquo>Not AfterE<rdquo> date for
256 the certificate.
257  
258 Certificate validity is the period of time during which a certificate
259 is valid. Validity can be expressed as an explicit date and time when
260 the certificate expires, or as a span of time after issuance, stated in
261 days, months, or years. For more information, see Validity
262 (https://tools.ietf.org/html/rfc5280#section-4.1.2.5) in RFC 5280.
263  
264 This value is unaffected when C<ValidityNotBefore> is also specified.
265 For example, if C<Validity> is set to 20 days in the future, the
266 certificate will expire 20 days from issuance time regardless of the
267 C<ValidityNotBefore> value.
268  
269 The end of the validity period configured on a certificate must not
270 exceed the limit set on its parents in the CA hierarchy.
271  
272  
273  
274 =head2 ValidityNotBefore => L<Paws::ACMPCA::Validity>
275  
276 Information describing the start of the validity period of the
277 certificate. This parameter sets the E<ldquo>Not Before" date for the
278 certificate.
279  
280 By default, when issuing a certificate, ACM Private CA sets the "Not
281 Before" date to the issuance time minus 60 minutes. This compensates
282 for clock inconsistencies across computer systems. The
283 C<ValidityNotBefore> parameter can be used to customize the E<ldquo>Not
284 BeforeE<rdquo> value.
285  
286 Unlike the C<Validity> parameter, the C<ValidityNotBefore> parameter is
287 optional.
288  
289 The C<ValidityNotBefore> value is expressed as an explicit date and
290 time, using the C<Validity> type value C<ABSOLUTE>. For more
291 information, see Validity
292 (https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_Validity.html)
293 in this API reference and Validity
294 (https://tools.ietf.org/html/rfc5280#section-4.1.2.5) in RFC 5280.
295  
296  
297  
298  
299 =head1 SEE ALSO
300  
301 This class forms part of L<Paws>, documenting arguments for method IssueCertificate in L<Paws::ACMPCA>
302  
303 =head1 BUGS and CONTRIBUTIONS
304  
305 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
306  
307 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
308  
309 =cut
310