Skip to content

Commit 200c126

Browse files
author
awstools
committed
feat(client-ssm): This release adds support for sharing Systems Manager parameters with other AWS accounts.
1 parent c40a218 commit 200c126

12 files changed

+497
-168
lines changed

clients/client-ssm/src/commands/DeleteResourcePolicyCommand.ts

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,22 @@ export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyR
2828

2929
/**
3030
* @public
31-
* <p>Deletes a Systems Manager resource policy. A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. Currently,
32-
* <code>OpsItemGroup</code> is the only resource that supports Systems Manager resource policies. The
33-
* resource policy for <code>OpsItemGroup</code> enables Amazon Web Services accounts to view and interact with
34-
* OpsCenter operational work items (OpsItems).</p>
31+
* <p>Deletes a Systems Manager resource policy. A resource policy helps you to define the IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources. The following
32+
* resources support Systems Manager resource policies.</p>
33+
* <ul>
34+
* <li>
35+
* <p>
36+
* <code>OpsItemGroup</code> - The resource policy for <code>OpsItemGroup</code> enables
37+
* Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).</p>
38+
* </li>
39+
* <li>
40+
* <p>
41+
* <code>Parameter</code> - The resource policy is used to share a parameter with other
42+
* accounts using Resource Access Manager (RAM). For more information about
43+
* cross-account sharing of parameters, see <a href="systems-manager/latest/userguide/parameter-store-shared-parameters.html">Working with
44+
* shared parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
45+
* </li>
46+
* </ul>
3547
* @example
3648
* Use a bare-bones client and the command you need to make an API call.
3749
* ```javascript
@@ -58,6 +70,13 @@ export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyR
5870
* @throws {@link InternalServerError} (server fault)
5971
* <p>An error occurred on the server side.</p>
6072
*
73+
* @throws {@link MalformedResourcePolicyDocumentException} (client fault)
74+
* <p>The specified policy document is malformed or invalid, or excessive
75+
* <code>PutResourcePolicy</code> or <code>DeleteResourcePolicy</code> calls have been made.</p>
76+
*
77+
* @throws {@link ResourceNotFoundException} (client fault)
78+
* <p>The specified parameter to be shared could not be found.</p>
79+
*
6180
* @throws {@link ResourcePolicyConflictException} (client fault)
6281
* <p>The hash provided in the call doesn't match the stored hash. This exception is thrown when
6382
* trying to update an obsolete policy version or when multiple requests to update a policy are
@@ -67,6 +86,9 @@ export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyR
6786
* <p>One or more parameters specified for the call aren't valid. Verify the parameters and their
6887
* values and try again.</p>
6988
*
89+
* @throws {@link ResourcePolicyNotFoundException} (client fault)
90+
* <p>No policies with the specified policy ID and hash could be found.</p>
91+
*
7092
* @throws {@link SSMServiceException}
7193
* <p>Base exception class for all service exceptions from SSM service.</p>
7294
*

clients/client-ssm/src/commands/DescribeParametersCommand.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,17 @@ export interface DescribeParametersCommandOutput extends DescribeParametersResul
2828

2929
/**
3030
* @public
31-
* <p>Get information about a parameter.</p>
31+
* <p>Lists the parameters in your Amazon Web Services account or the parameters shared with you when you enable
32+
* the <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribeParameters.html#systemsmanager-DescribeParameters-request-Shared">Shared</a> option.</p>
3233
* <p>Request results are returned on a best-effort basis. If you specify <code>MaxResults</code>
3334
* in the request, the response includes information up to the limit specified. The number of items
3435
* returned, however, can be between zero and the value of <code>MaxResults</code>. If the service
3536
* reaches an internal limit while processing the results, it stops the operation and returns the
3637
* matching values up to that point and a <code>NextToken</code>. You can specify the
3738
* <code>NextToken</code> in a subsequent call to get the next set of results.</p>
3839
* <important>
39-
* <p>If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must
40-
* also update the key alias the parameter uses to reference KMS. Otherwise,
40+
* <p>If you change the KMS key alias for the KMS key used to encrypt a parameter,
41+
* then you must also update the key alias the parameter uses to reference KMS. Otherwise,
4142
* <code>DescribeParameters</code> retrieves whatever the original key alias was
4243
* referencing.</p>
4344
* </important>
@@ -67,13 +68,15 @@ export interface DescribeParametersCommandOutput extends DescribeParametersResul
6768
* ],
6869
* MaxResults: Number("int"),
6970
* NextToken: "STRING_VALUE",
71+
* Shared: true || false,
7072
* };
7173
* const command = new DescribeParametersCommand(input);
7274
* const response = await client.send(command);
7375
* // { // DescribeParametersResult
7476
* // Parameters: [ // ParameterMetadataList
7577
* // { // ParameterMetadata
7678
* // Name: "STRING_VALUE",
79+
* // ARN: "STRING_VALUE",
7780
* // Type: "String" || "StringList" || "SecureString",
7881
* // KeyId: "STRING_VALUE",
7982
* // LastModifiedDate: new Date("TIMESTAMP"),

clients/client-ssm/src/commands/GetParameterHistoryCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export interface GetParameterHistoryCommandOutput extends GetParameterHistoryRes
3434
* @public
3535
* <p>Retrieves the history of all changes to a parameter.</p>
3636
* <important>
37-
* <p>If you change the KMS key alias for the KMS key used to encrypt a parameter, then you must
38-
* also update the key alias the parameter uses to reference KMS. Otherwise,
37+
* <p>If you change the KMS key alias for the KMS key used to encrypt a parameter,
38+
* then you must also update the key alias the parameter uses to reference KMS. Otherwise,
3939
* <code>GetParameterHistory</code> retrieves whatever the original key alias was
4040
* referencing.</p>
4141
* </important>

clients/client-ssm/src/commands/GetResourcePoliciesCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ export interface GetResourcePoliciesCommandOutput extends GetResourcePoliciesRes
6464
* @throws {@link InternalServerError} (server fault)
6565
* <p>An error occurred on the server side.</p>
6666
*
67+
* @throws {@link ResourceNotFoundException} (client fault)
68+
* <p>The specified parameter to be shared could not be found.</p>
69+
*
6770
* @throws {@link ResourcePolicyInvalidParameterException} (client fault)
6871
* <p>One or more parameters specified for the call aren't valid. Verify the parameters and their
6972
* values and try again.</p>

clients/client-ssm/src/commands/PutResourcePolicyCommand.ts

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,36 @@ export interface PutResourcePolicyCommandOutput extends PutResourcePolicyRespons
3030
* @public
3131
* <p>Creates or updates a Systems Manager resource policy. A resource policy helps you to define the
3232
* IAM entity (for example, an Amazon Web Services account) that can manage your Systems Manager resources.
33-
* Currently, <code>OpsItemGroup</code> is the only resource that supports Systems Manager resource policies.
34-
* The resource policy for <code>OpsItemGroup</code> enables Amazon Web Services accounts to view and interact
35-
* with OpsCenter operational work items (OpsItems).</p>
33+
* The following resources support Systems Manager resource policies.</p>
34+
* <ul>
35+
* <li>
36+
* <p>
37+
* <code>OpsItemGroup</code> - The resource policy for <code>OpsItemGroup</code> enables
38+
* Amazon Web Services accounts to view and interact with OpsCenter operational work items (OpsItems).</p>
39+
* </li>
40+
* <li>
41+
* <p>
42+
* <code>Parameter</code> - The resource policy is used to share a parameter with other
43+
* accounts using Resource Access Manager (RAM). </p>
44+
* <p>To share a parameter, it must be in the advanced parameter tier. For information about
45+
* parameter tiers, see <a href="https://docs.aws.amazon.com/parameter-store- advanced-parameters.html">Managing parameter tiers</a>. For information about
46+
* changing an existing standard parameter to an advanced parameter, see <a href="https://docs.aws.amazon.com/parameter-store-advanced-parameters.html#parameter- store-advanced-parameters-enabling">Changing a standard parameter to an advanced
47+
* parameter</a>.</p>
48+
* <p>To share a <code>SecureString</code> parameter, it must be encrypted with a customer managed key, and you must share the key separately through Key Management Service. Amazon Web Services managed keys cannot be shared. Parameters encrypted with the default Amazon Web Services managed key can be updated to use a customer managed key instead. For KMS key definitions, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-mgmt">KMS concepts</a> in
49+
* the <i>Key Management Service Developer Guide</i>.</p>
50+
* <important>
51+
* <p>While you can share a parameter using the Systems Manager <code>PutResourcePolicy</code> operation,
52+
* we recommend using Resource Access Manager (RAM) instead. This is because using
53+
* <code>PutResourcePolicy</code> requires the extra step of promoting the parameter to a
54+
* standard RAM Resource Share using the RAM
55+
* <a href="https://docs.aws.amazon.com/ram/latest/APIReference/API_PromoteResourceShareCreatedFromPolicy.html">PromoteResourceShareCreatedFromPolicy</a> API operation. Otherwise, the parameter won't
56+
* be returned by the Systems Manager <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_DescribeParameters.html">DescribeParameters</a> API operation using the <code>--shared</code> option.</p>
57+
* <p>For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-shared-parameters.html#share">Sharing a
58+
* parameter</a> in the <i>Amazon Web Services Systems Manager User Guide</i>
59+
* </p>
60+
* </important>
61+
* </li>
62+
* </ul>
3663
* @example
3764
* Use a bare-bones client and the command you need to make an API call.
3865
* ```javascript
@@ -63,6 +90,13 @@ export interface PutResourcePolicyCommandOutput extends PutResourcePolicyRespons
6390
* @throws {@link InternalServerError} (server fault)
6491
* <p>An error occurred on the server side.</p>
6592
*
93+
* @throws {@link MalformedResourcePolicyDocumentException} (client fault)
94+
* <p>The specified policy document is malformed or invalid, or excessive
95+
* <code>PutResourcePolicy</code> or <code>DeleteResourcePolicy</code> calls have been made.</p>
96+
*
97+
* @throws {@link ResourceNotFoundException} (client fault)
98+
* <p>The specified parameter to be shared could not be found.</p>
99+
*
66100
* @throws {@link ResourcePolicyConflictException} (client fault)
67101
* <p>The hash provided in the call doesn't match the stored hash. This exception is thrown when
68102
* trying to update an obsolete policy version or when multiple requests to update a policy are
@@ -77,6 +111,9 @@ export interface PutResourcePolicyCommandOutput extends PutResourcePolicyRespons
77111
* greater than 1024 bytes in size. And only one policy can be attached to
78112
* <code>OpsItemGroup</code>. Verify these limits and try again.</p>
79113
*
114+
* @throws {@link ResourcePolicyNotFoundException} (client fault)
115+
* <p>No policies with the specified policy ID and hash could be found.</p>
116+
*
80117
* @throws {@link SSMServiceException}
81118
* <p>Base exception class for all service exceptions from SSM service.</p>
82119
*

clients/client-ssm/src/commands/StopAutomationExecutionCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { StopAutomationExecutionRequest, StopAutomationExecutionResult } from "../models/models_1";
8+
import { StopAutomationExecutionRequest, StopAutomationExecutionResult } from "../models/models_2";
99
import { de_StopAutomationExecutionCommand, se_StopAutomationExecutionCommand } from "../protocols/Aws_json1_1";
1010
import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient";
1111

clients/client-ssm/src/commands/TerminateSessionCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { TerminateSessionRequest } from "../models/models_1";
9-
import { TerminateSessionResponse } from "../models/models_2";
8+
import { TerminateSessionRequest, TerminateSessionResponse } from "../models/models_2";
109
import { de_TerminateSessionCommand, se_TerminateSessionCommand } from "../protocols/Aws_json1_1";
1110
import { ServiceInputTypes, ServiceOutputTypes, SSMClientResolvedConfig } from "../SSMClient";
1211

clients/client-ssm/src/models/models_0.ts

Lines changed: 79 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,8 +2269,8 @@ export interface DocumentRequires {
22692269
/**
22702270
* @public
22712271
* <p>An optional field specifying the version of the artifact associated with the document. For
2272-
* example, 12.6. This value is unique across all versions of a document, and
2273-
* can't be changed.</p>
2272+
* example, 12.6. This value is unique across all versions of a document, and can't be
2273+
* changed.</p>
22742274
*/
22752275
VersionName?: string;
22762276
}
@@ -4650,6 +4650,10 @@ export interface DeleteParameterRequest {
46504650
/**
46514651
* @public
46524652
* <p>The name of the parameter to delete.</p>
4653+
* <note>
4654+
* <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name
4655+
* itself.</p>
4656+
* </note>
46534657
*/
46544658
Name: string | undefined;
46554659
}
@@ -4687,6 +4691,10 @@ export interface DeleteParametersRequest {
46874691
* @public
46884692
* <p>The names of the parameters to delete. After deleting a parameter, wait for at least 30
46894693
* seconds to create a parameter with the same name.</p>
4694+
* <note>
4695+
* <p>You can't enter the Amazon Resource Name (ARN) for a parameter, only the parameter name
4696+
* itself.</p>
4697+
* </note>
46904698
*/
46914699
Names: string[] | undefined;
46924700
}
@@ -4830,6 +4838,51 @@ export interface DeleteResourcePolicyRequest {
48304838
*/
48314839
export interface DeleteResourcePolicyResponse {}
48324840

4841+
/**
4842+
* @public
4843+
* <p>The specified policy document is malformed or invalid, or excessive
4844+
* <code>PutResourcePolicy</code> or <code>DeleteResourcePolicy</code> calls have been made.</p>
4845+
*/
4846+
export class MalformedResourcePolicyDocumentException extends __BaseException {
4847+
readonly name: "MalformedResourcePolicyDocumentException" = "MalformedResourcePolicyDocumentException";
4848+
readonly $fault: "client" = "client";
4849+
Message?: string;
4850+
/**
4851+
* @internal
4852+
*/
4853+
constructor(opts: __ExceptionOptionType<MalformedResourcePolicyDocumentException, __BaseException>) {
4854+
super({
4855+
name: "MalformedResourcePolicyDocumentException",
4856+
$fault: "client",
4857+
...opts,
4858+
});
4859+
Object.setPrototypeOf(this, MalformedResourcePolicyDocumentException.prototype);
4860+
this.Message = opts.Message;
4861+
}
4862+
}
4863+
4864+
/**
4865+
* @public
4866+
* <p>The specified parameter to be shared could not be found.</p>
4867+
*/
4868+
export class ResourceNotFoundException extends __BaseException {
4869+
readonly name: "ResourceNotFoundException" = "ResourceNotFoundException";
4870+
readonly $fault: "client" = "client";
4871+
Message?: string;
4872+
/**
4873+
* @internal
4874+
*/
4875+
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>) {
4876+
super({
4877+
name: "ResourceNotFoundException",
4878+
$fault: "client",
4879+
...opts,
4880+
});
4881+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
4882+
this.Message = opts.Message;
4883+
}
4884+
}
4885+
48334886
/**
48344887
* @public
48354888
* <p>The hash provided in the call doesn't match the stored hash. This exception is thrown when
@@ -4879,6 +4932,28 @@ export class ResourcePolicyInvalidParameterException extends __BaseException {
48794932
}
48804933
}
48814934

4935+
/**
4936+
* @public
4937+
* <p>No policies with the specified policy ID and hash could be found.</p>
4938+
*/
4939+
export class ResourcePolicyNotFoundException extends __BaseException {
4940+
readonly name: "ResourcePolicyNotFoundException" = "ResourcePolicyNotFoundException";
4941+
readonly $fault: "client" = "client";
4942+
Message?: string;
4943+
/**
4944+
* @internal
4945+
*/
4946+
constructor(opts: __ExceptionOptionType<ResourcePolicyNotFoundException, __BaseException>) {
4947+
super({
4948+
name: "ResourcePolicyNotFoundException",
4949+
$fault: "client",
4950+
...opts,
4951+
});
4952+
Object.setPrototypeOf(this, ResourcePolicyNotFoundException.prototype);
4953+
this.Message = opts.Message;
4954+
}
4955+
}
4956+
48824957
/**
48834958
* @public
48844959
*/
@@ -6862,8 +6937,8 @@ export interface DescribeDocumentRequest {
68626937
/**
68636938
* @public
68646939
* <p>An optional field specifying the version of the artifact associated with the document. For
6865-
* example, 12.6. This value is unique across all versions of a document, and
6866-
* can't be changed.</p>
6940+
* example, 12.6. This value is unique across all versions of a document, and can't be
6941+
* changed.</p>
68676942
*/
68686943
VersionName?: string;
68696944
}
@@ -9352,66 +9427,6 @@ export interface DescribeMaintenanceWindowTasksRequest {
93529427
NextToken?: string;
93539428
}
93549429

9355-
/**
9356-
* @public
9357-
* @enum
9358-
*/
9359-
export const MaintenanceWindowTaskCutoffBehavior = {
9360-
CancelTask: "CANCEL_TASK",
9361-
ContinueTask: "CONTINUE_TASK",
9362-
} as const;
9363-
9364-
/**
9365-
* @public
9366-
*/
9367-
export type MaintenanceWindowTaskCutoffBehavior =
9368-
(typeof MaintenanceWindowTaskCutoffBehavior)[keyof typeof MaintenanceWindowTaskCutoffBehavior];
9369-
9370-
/**
9371-
* @public
9372-
* <p>Information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed
9373-
* node-level logs to.</p>
9374-
* <note>
9375-
* <p>
9376-
* <code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the
9377-
* <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure.
9378-
* For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance
9379-
* window task types, see <a>MaintenanceWindowTaskInvocationParameters</a>.</p>
9380-
* </note>
9381-
*/
9382-
export interface LoggingInfo {
9383-
/**
9384-
* @public
9385-
* <p>The name of an S3 bucket where execution logs are stored.</p>
9386-
*/
9387-
S3BucketName: string | undefined;
9388-
9389-
/**
9390-
* @public
9391-
* <p>(Optional) The S3 bucket subfolder. </p>
9392-
*/
9393-
S3KeyPrefix?: string;
9394-
9395-
/**
9396-
* @public
9397-
* <p>The Amazon Web Services Region where the S3 bucket is located.</p>
9398-
*/
9399-
S3Region: string | undefined;
9400-
}
9401-
9402-
/**
9403-
* @public
9404-
* <p>Defines the values for a task parameter.</p>
9405-
*/
9406-
export interface MaintenanceWindowTaskParameterValueExpression {
9407-
/**
9408-
* @public
9409-
* <p>This field contains an array of 0 or more strings, each 1 to 255 characters in
9410-
* length.</p>
9411-
*/
9412-
Values?: string[];
9413-
}
9414-
94159430
/**
94169431
* @internal
94179432
*/
@@ -9598,13 +9613,3 @@ export const DescribeMaintenanceWindowTargetsResultFilterSensitiveLog = (
95989613
...obj,
95999614
...(obj.Targets && { Targets: obj.Targets.map((item) => MaintenanceWindowTargetFilterSensitiveLog(item)) }),
96009615
});
9601-
9602-
/**
9603-
* @internal
9604-
*/
9605-
export const MaintenanceWindowTaskParameterValueExpressionFilterSensitiveLog = (
9606-
obj: MaintenanceWindowTaskParameterValueExpression
9607-
): any => ({
9608-
...obj,
9609-
...(obj.Values && { Values: SENSITIVE_STRING }),
9610-
});

0 commit comments

Comments
 (0)