forked from aws/aws-sdk-js-v3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdateCertificateAuthorityCommand.ts
More file actions
107 lines (98 loc) · 4.58 KB
/
UpdateCertificateAuthorityCommand.ts
File metadata and controls
107 lines (98 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { ACMPCAClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ACMPCAClient";
import { UpdateCertificateAuthorityRequest } from "../models/models_0";
import {
deserializeAws_json1_1UpdateCertificateAuthorityCommand,
serializeAws_json1_1UpdateCertificateAuthorityCommand,
} from "../protocols/Aws_json1_1";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
MiddlewareStack,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";
export interface UpdateCertificateAuthorityCommandInput extends UpdateCertificateAuthorityRequest {}
export interface UpdateCertificateAuthorityCommandOutput extends __MetadataBearer {}
/**
* <p>Updates the status or configuration of a private certificate authority (CA). Your
* private CA must be in the <code>ACTIVE</code> or <code>DISABLED</code> state before you
* can update it. You can disable a private CA that is in the <code>ACTIVE</code> state or
* make a CA that is in the <code>DISABLED</code> state active again.</p>
* <note>
* <p>Both PCA and the IAM principal must have permission to write to
* the S3 bucket that you specify. If the IAM principal making the call
* does not have permission to write to the bucket, then an exception is
* thrown. For more information, see <a href="https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaAuthAccess.html">Configure
* Access to ACM Private CA</a>.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { ACMPCAClient, UpdateCertificateAuthorityCommand } from "@aws-sdk/client-acm-pca"; // ES Modules import
* // const { ACMPCAClient, UpdateCertificateAuthorityCommand } = require("@aws-sdk/client-acm-pca"); // CommonJS import
* const client = new ACMPCAClient(config);
* const command = new UpdateCertificateAuthorityCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link UpdateCertificateAuthorityCommandInput} for command's `input` shape.
* @see {@link UpdateCertificateAuthorityCommandOutput} for command's `response` shape.
* @see {@link ACMPCAClientResolvedConfig | config} for command's `input` shape.
*
*/
export class UpdateCertificateAuthorityCommand extends $Command<
UpdateCertificateAuthorityCommandInput,
UpdateCertificateAuthorityCommandOutput,
ACMPCAClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties
constructor(readonly input: UpdateCertificateAuthorityCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}
/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: ACMPCAClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<UpdateCertificateAuthorityCommandInput, UpdateCertificateAuthorityCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
const stack = clientStack.concat(this.middlewareStack);
const { logger } = configuration;
const clientName = "ACMPCAClient";
const commandName = "UpdateCertificateAuthorityCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: UpdateCertificateAuthorityRequest.filterSensitiveLog,
outputFilterSensitiveLog: (output: any) => output,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}
private serialize(input: UpdateCertificateAuthorityCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1UpdateCertificateAuthorityCommand(input, context);
}
private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<UpdateCertificateAuthorityCommandOutput> {
return deserializeAws_json1_1UpdateCertificateAuthorityCommand(output, context);
}
// Start section: command_body_extra
// End section: command_body_extra
}