Skip to content

Commit 3cc0ca9

Browse files
author
awstools
committed
feat(client-ram): Resource owners can now specify ResourceShareConfiguration request parameter for CreateResourceShare API including RetainSharingOnAccountLeaveOrganization boolean parameter
1 parent eded08f commit 3cc0ca9

8 files changed

Lines changed: 77 additions & 4 deletions

File tree

clients/client-ram/src/commands/CreateResourceShareCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ export interface CreateResourceShareCommandOutput extends CreateResourceShareRes
6565
* sources: [ // SourceArnOrAccountList
6666
* "STRING_VALUE",
6767
* ],
68+
* resourceShareConfiguration: { // ResourceShareConfiguration
69+
* retainSharingOnAccountLeaveOrganization: true || false,
70+
* },
6871
* };
6972
* const command = new CreateResourceShareCommand(input);
7073
* const response = await client.send(command);
@@ -85,6 +88,9 @@ export interface CreateResourceShareCommandOutput extends CreateResourceShareRes
8588
* // creationTime: new Date("TIMESTAMP"),
8689
* // lastUpdatedTime: new Date("TIMESTAMP"),
8790
* // featureSet: "CREATED_FROM_POLICY" || "PROMOTING_TO_STANDARD" || "STANDARD",
91+
* // resourceShareConfiguration: { // ResourceShareConfiguration
92+
* // retainSharingOnAccountLeaveOrganization: true || false,
93+
* // },
8894
* // },
8995
* // clientToken: "STRING_VALUE",
9096
* // };

clients/client-ram/src/commands/GetResourceSharesCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ export interface GetResourceSharesCommandOutput extends GetResourceSharesRespons
8383
* // creationTime: new Date("TIMESTAMP"),
8484
* // lastUpdatedTime: new Date("TIMESTAMP"),
8585
* // featureSet: "CREATED_FROM_POLICY" || "PROMOTING_TO_STANDARD" || "STANDARD",
86+
* // resourceShareConfiguration: { // ResourceShareConfiguration
87+
* // retainSharingOnAccountLeaveOrganization: true || false,
88+
* // },
8689
* // },
8790
* // ],
8891
* // nextToken: "STRING_VALUE",

clients/client-ram/src/commands/UpdateResourceShareCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export interface UpdateResourceShareCommandOutput extends UpdateResourceShareRes
6161
* // creationTime: new Date("TIMESTAMP"),
6262
* // lastUpdatedTime: new Date("TIMESTAMP"),
6363
* // featureSet: "CREATED_FROM_POLICY" || "PROMOTING_TO_STANDARD" || "STANDARD",
64+
* // resourceShareConfiguration: { // ResourceShareConfiguration
65+
* // retainSharingOnAccountLeaveOrganization: true || false,
66+
* // },
6467
* // },
6568
* // clientToken: "STRING_VALUE",
6669
* // };

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,18 @@ export interface CreatePermissionVersionResponse {
894894
clientToken?: string | undefined;
895895
}
896896

897+
/**
898+
* <p>The configuration of the resource share</p>
899+
* @public
900+
*/
901+
export interface ResourceShareConfiguration {
902+
/**
903+
* <p>Specifies whether the consumer account retains access to the resource share after leaving the organization.</p>
904+
* @public
905+
*/
906+
retainSharingOnAccountLeaveOrganization?: boolean | undefined;
907+
}
908+
897909
/**
898910
* @public
899911
*/
@@ -1000,6 +1012,12 @@ export interface CreateResourceShareRequest {
10001012
* @public
10011013
*/
10021014
sources?: string[] | undefined;
1015+
1016+
/**
1017+
* <p>Specifies the configuration of this resource share.</p>
1018+
* @public
1019+
*/
1020+
resourceShareConfiguration?: ResourceShareConfiguration | undefined;
10031021
}
10041022

10051023
/**
@@ -1108,6 +1126,12 @@ export interface ResourceShare {
11081126
* @public
11091127
*/
11101128
featureSet?: ResourceShareFeatureSet | undefined;
1129+
1130+
/**
1131+
* <p>The configuration of the resource share</p>
1132+
* @public
1133+
*/
1134+
resourceShareConfiguration?: ResourceShareConfiguration | undefined;
11111135
}
11121136

11131137
/**

clients/client-ram/src/schemas/schemas_0.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const _RS = "ResourceShare";
126126
const _RSA = "ResourceShareAssociation";
127127
const _RSAL = "ResourceShareArnList";
128128
const _RSALe = "ResourceShareAssociationList";
129+
const _RSC = "ResourceShareConfiguration";
129130
const _RSI = "ResourceShareInvitation";
130131
const _RSIAAE = "ResourceShareInvitationAlreadyAcceptedException";
131132
const _RSIAL = "ResourceShareInvitationArnList";
@@ -218,11 +219,13 @@ const _rS = "resourceShare";
218219
const _rSA = "resourceShareArn";
219220
const _rSAe = "resourceShareAssociations";
220221
const _rSAes = "resourceShareArns";
222+
const _rSC = "resourceShareConfiguration";
221223
const _rSI = "resourceShareInvitation";
222224
const _rSIA = "resourceShareInvitationArn";
223225
const _rSIAe = "resourceShareInvitationArns";
224226
const _rSIe = "resourceShareInvitations";
225227
const _rSN = "resourceShareName";
228+
const _rSOALO = "retainSharingOnAccountLeaveOrganization";
226229
const _rSS = "resourceShareStatus";
227230
const _rSe = "resourceShares";
228231
const _rT = "resourceType";
@@ -534,8 +537,8 @@ export var CreatePermissionVersionResponse$: StaticStructureSchema = [3, n0, _CP
534537
];
535538
export var CreateResourceShareRequest$: StaticStructureSchema = [3, n0, _CRSR,
536539
0,
537-
[_n, _rA, _p, _t, _aEP, _cT, _pAe, _so],
538-
[0, [() => ResourceArnList, 0], [() => PrincipalArnOrIdList, 0], () => TagList, 2, 0, [() => PermissionArnList, 0], [() => SourceArnOrAccountList, 0]], 1
540+
[_n, _rA, _p, _t, _aEP, _cT, _pAe, _so, _rSC],
541+
[0, [() => ResourceArnList, 0], [() => PrincipalArnOrIdList, 0], () => TagList, 2, 0, [() => PermissionArnList, 0], [() => SourceArnOrAccountList, 0], () => ResourceShareConfiguration$], 1
539542
];
540543
export var CreateResourceShareResponse$: StaticStructureSchema = [3, n0, _CRSRr,
541544
0,
@@ -809,14 +812,19 @@ export var Resource$: StaticStructureSchema = [3, n0, _R,
809812
];
810813
export var ResourceShare$: StaticStructureSchema = [3, n0, _RS,
811814
0,
812-
[_rSA, _n, _oAI, _aEP, _st, _sM, _t, _cTr, _lUT, _fS],
813-
[0, 0, 0, 2, 0, 0, () => TagList, 4, 4, 0]
815+
[_rSA, _n, _oAI, _aEP, _st, _sM, _t, _cTr, _lUT, _fS, _rSC],
816+
[0, 0, 0, 2, 0, 0, () => TagList, 4, 4, 0, () => ResourceShareConfiguration$]
814817
];
815818
export var ResourceShareAssociation$: StaticStructureSchema = [3, n0, _RSA,
816819
0,
817820
[_rSA, _rSN, _aE, _aT, _st, _sM, _cTr, _lUT, _ex],
818821
[0, 0, 0, 0, 0, 0, 4, 4, 2]
819822
];
823+
export var ResourceShareConfiguration$: StaticStructureSchema = [3, n0, _RSC,
824+
0,
825+
[_rSOALO],
826+
[2]
827+
];
820828
export var ResourceShareInvitation$: StaticStructureSchema = [3, n0, _RSI,
821829
0,
822830
[_rSIA, _rSN, _rSA, _sAI, _rAI, _iT, _st, _rSAe, _rAec],

clients/client-ram/test/index-objects.spec.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ import {
189189
ResourceShareAssociation$,
190190
ResourceShareAssociationStatus,
191191
ResourceShareAssociationType,
192+
ResourceShareConfiguration$,
192193
ResourceShareFeatureSet,
193194
ResourceShareInvitation$,
194195
ResourceShareInvitationAlreadyAcceptedException,
@@ -385,6 +386,7 @@ assert(typeof ReplacePermissionAssociationsWork$ === "object");
385386
assert(typeof Resource$ === "object");
386387
assert(typeof ResourceShare$ === "object");
387388
assert(typeof ResourceShareAssociation$ === "object");
389+
assert(typeof ResourceShareConfiguration$ === "object");
388390
assert(typeof ResourceShareInvitation$ === "object");
389391
assert(typeof ResourceSharePermissionDetail$ === "object");
390392
assert(typeof ResourceSharePermissionSummary$ === "object");

clients/client-ram/test/index-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export type {
190190
Resource,
191191
ResourceShare,
192192
ResourceShareAssociation,
193+
ResourceShareConfiguration,
193194
ResourceShareInvitation,
194195
ResourceSharePermissionDetail,
195196
ResourceSharePermissionSummary,

codegen/sdk-codegen/aws-models/ram.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,12 @@
18691869
"traits": {
18701870
"smithy.api#documentation": "<p>Specifies source constraints (accounts, ARNs, organization IDs, or organization paths) that limit when service principals can access resources in this resource share. When a service principal attempts to access a shared resource, validation is performed to ensure the request originates from one of the specified sources. This helps prevent confused deputy attacks by applying constraints on where service principals can access resources from.</p>"
18711871
}
1872+
},
1873+
"resourceShareConfiguration": {
1874+
"target": "com.amazonaws.ram#ResourceShareConfiguration",
1875+
"traits": {
1876+
"smithy.api#documentation": "<p>Specifies the configuration of this resource share.</p>"
1877+
}
18721878
}
18731879
},
18741880
"traits": {
@@ -5116,6 +5122,12 @@
51165122
"traits": {
51175123
"smithy.api#documentation": "<p>Indicates what features are available for this resource share. This parameter can have one of\n the following values:</p>\n <ul>\n <li>\n <p>\n <b>STANDARD</b> – A resource share that supports all\n functionality. These resource shares are visible to all principals you share the resource share with. \n You can modify these resource shares in RAM using the console or APIs. This resource share might \n have been created by RAM, or it might have been <b>CREATED_FROM_POLICY</b> and then promoted.</p>\n </li>\n <li>\n <p>\n <b>CREATED_FROM_POLICY</b> – The customer\n manually shared a resource by attaching a resource-based policy. That policy did\n not match any existing managed permissions, so RAM created this customer managed permission automatically on the\n customer's behalf based on the attached policy document. This type of resource share \n is visible only to the Amazon Web Services account that created it. You can't modify it in \n RAM unless you promote it. For more information, \n see <a>PromoteResourceShareCreatedFromPolicy</a>.</p>\n </li>\n <li>\n <p>\n <b>PROMOTING_TO_STANDARD</b> – This\n resource share was originally <code>CREATED_FROM_POLICY</code>, but the customer ran\n the <a>PromoteResourceShareCreatedFromPolicy</a> and that operation\n is still in progress. This value changes to <code>STANDARD</code> when\n complete.</p>\n </li>\n </ul>"
51185124
}
5125+
},
5126+
"resourceShareConfiguration": {
5127+
"target": "com.amazonaws.ram#ResourceShareConfiguration",
5128+
"traits": {
5129+
"smithy.api#documentation": "<p>The configuration of the resource share</p>"
5130+
}
51195131
}
51205132
},
51215133
"traits": {
@@ -5278,6 +5290,20 @@
52785290
}
52795291
}
52805292
},
5293+
"com.amazonaws.ram#ResourceShareConfiguration": {
5294+
"type": "structure",
5295+
"members": {
5296+
"retainSharingOnAccountLeaveOrganization": {
5297+
"target": "com.amazonaws.ram#Boolean",
5298+
"traits": {
5299+
"smithy.api#documentation": "<p>Specifies whether the consumer account retains access to the resource share after leaving the organization.</p>"
5300+
}
5301+
}
5302+
},
5303+
"traits": {
5304+
"smithy.api#documentation": "<p>The configuration of the resource share</p>"
5305+
}
5306+
},
52815307
"com.amazonaws.ram#ResourceShareFeatureSet": {
52825308
"type": "enum",
52835309
"members": {

0 commit comments

Comments
 (0)