Skip to content

Commit a409809

Browse files
author
awstools
committed
feat(client-lakeformation): This release added "condition" to LakeFormation OptIn APIs, also added WithPrivilegedAccess flag to RegisterResource and DescribeResource.
1 parent 5e8eea6 commit a409809

12 files changed

+132
-14
lines changed

clients/client-lakeformation/src/commands/BatchGrantPermissionsCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ export interface BatchGrantPermissionsCommandOutput extends BatchGrantPermission
108108
* Permissions: [ // PermissionList
109109
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
110110
* ],
111+
* Condition: { // Condition
112+
* Expression: "STRING_VALUE",
113+
* },
111114
* PermissionsWithGrantOption: [
112115
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
113116
* ],
@@ -189,6 +192,9 @@ export interface BatchGrantPermissionsCommandOutput extends BatchGrantPermission
189192
* // Permissions: [ // PermissionList
190193
* // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
191194
* // ],
195+
* // Condition: { // Condition
196+
* // Expression: "STRING_VALUE",
197+
* // },
192198
* // PermissionsWithGrantOption: [
193199
* // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
194200
* // ],

clients/client-lakeformation/src/commands/BatchRevokePermissionsCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ export interface BatchRevokePermissionsCommandOutput extends BatchRevokePermissi
108108
* Permissions: [ // PermissionList
109109
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
110110
* ],
111+
* Condition: { // Condition
112+
* Expression: "STRING_VALUE",
113+
* },
111114
* PermissionsWithGrantOption: [
112115
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
113116
* ],
@@ -189,6 +192,9 @@ export interface BatchRevokePermissionsCommandOutput extends BatchRevokePermissi
189192
* // Permissions: [ // PermissionList
190193
* // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
191194
* // ],
195+
* // Condition: { // Condition
196+
* // Expression: "STRING_VALUE",
197+
* // },
192198
* // PermissionsWithGrantOption: [
193199
* // "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
194200
* // ],

clients/client-lakeformation/src/commands/CreateLakeFormationOptInCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ export interface CreateLakeFormationOptInCommandOutput extends CreateLakeFormati
101101
* Name: "STRING_VALUE", // required
102102
* },
103103
* },
104+
* Condition: { // Condition
105+
* Expression: "STRING_VALUE",
106+
* },
104107
* };
105108
* const command = new CreateLakeFormationOptInCommand(input);
106109
* const response = await client.send(command);
@@ -132,6 +135,9 @@ export interface CreateLakeFormationOptInCommandOutput extends CreateLakeFormati
132135
* @throws {@link OperationTimeoutException} (client fault)
133136
* <p>The operation timed out.</p>
134137
*
138+
* @throws {@link ResourceNumberLimitExceededException} (client fault)
139+
* <p>A resource numerical limit was exceeded.</p>
140+
*
135141
* @throws {@link LakeFormationServiceException}
136142
* <p>Base exception class for all service exceptions from LakeFormation service.</p>
137143
*

clients/client-lakeformation/src/commands/DeleteLakeFormationOptInCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ export interface DeleteLakeFormationOptInCommandOutput extends DeleteLakeFormati
101101
* Name: "STRING_VALUE", // required
102102
* },
103103
* },
104+
* Condition: { // Condition
105+
* Expression: "STRING_VALUE",
106+
* },
104107
* };
105108
* const command = new DeleteLakeFormationOptInCommand(input);
106109
* const response = await client.send(command);

clients/client-lakeformation/src/commands/DescribeResourceCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export interface DescribeResourceCommandOutput extends DescribeResourceResponse,
4747
* // LastModified: new Date("TIMESTAMP"),
4848
* // WithFederation: true || false,
4949
* // HybridAccessEnabled: true || false,
50+
* // WithPrivilegedAccess: true || false,
5051
* // },
5152
* // };
5253
*

clients/client-lakeformation/src/commands/GrantPermissionsCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ export interface GrantPermissionsCommandOutput extends GrantPermissionsResponse,
106106
* Permissions: [ // PermissionList // required
107107
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
108108
* ],
109+
* Condition: { // Condition
110+
* Expression: "STRING_VALUE",
111+
* },
109112
* PermissionsWithGrantOption: [
110113
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
111114
* ],

clients/client-lakeformation/src/commands/ListResourcesCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export interface ListResourcesCommandOutput extends ListResourcesResponse, __Met
5858
* // LastModified: new Date("TIMESTAMP"),
5959
* // WithFederation: true || false,
6060
* // HybridAccessEnabled: true || false,
61+
* // WithPrivilegedAccess: true || false,
6162
* // },
6263
* // ],
6364
* // NextToken: "STRING_VALUE",

clients/client-lakeformation/src/commands/RegisterResourceCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface RegisterResourceCommandOutput extends RegisterResourceResponse,
2929

3030
/**
3131
* <p>Registers the resource as managed by the Data Catalog.</p>
32-
* <p>To add or update data, Lake Formation needs read/write access to the chosen Amazon S3 path. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.</p>
32+
* <p>To add or update data, Lake Formation needs read/write access to the chosen data location. Choose a role that you know has permission to do this, or choose the AWSServiceRoleForLakeFormationDataAccess service-linked role. When you register the first Amazon S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.</p>
3333
* <p>The following request registers a new location and gives Lake Formation permission to use the service-linked role to access that location.</p>
3434
* <p>
3535
* <code>ResourceArn = arn:aws:s3:::my-bucket/
@@ -51,6 +51,7 @@ export interface RegisterResourceCommandOutput extends RegisterResourceResponse,
5151
* RoleArn: "STRING_VALUE",
5252
* WithFederation: true || false,
5353
* HybridAccessEnabled: true || false,
54+
* WithPrivilegedAccess: true || false,
5455
* };
5556
* const command = new RegisterResourceCommand(input);
5657
* const response = await client.send(command);

clients/client-lakeformation/src/commands/RevokePermissionsCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ export interface RevokePermissionsCommandOutput extends RevokePermissionsRespons
105105
* Permissions: [ // PermissionList // required
106106
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
107107
* ],
108+
* Condition: { // Condition
109+
* Expression: "STRING_VALUE",
110+
* },
108111
* PermissionsWithGrantOption: [
109112
* "ALL" || "SELECT" || "ALTER" || "DROP" || "DELETE" || "INSERT" || "DESCRIBE" || "CREATE_DATABASE" || "CREATE_TABLE" || "DATA_LOCATION_ACCESS" || "CREATE_LF_TAG" || "ASSOCIATE" || "GRANT_WITH_LF_TAG_EXPRESSION" || "CREATE_LF_TAG_EXPRESSION" || "CREATE_CATALOG" || "SUPER_USER",
110113
* ],

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

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,18 @@ export interface AuditContext {
734734
AdditionalAuditContext?: string | undefined;
735735
}
736736

737+
/**
738+
* <p>A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.</p>
739+
* @public
740+
*/
741+
export interface Condition {
742+
/**
743+
* <p>An expression written based on the Cedar Policy Language used to match the principal attributes.</p>
744+
* @public
745+
*/
746+
Expression?: string | undefined;
747+
}
748+
737749
/**
738750
* @public
739751
* @enum
@@ -804,6 +816,12 @@ export interface BatchPermissionsRequestEntry {
804816
*/
805817
Permissions?: Permission[] | undefined;
806818

819+
/**
820+
* <p>A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.</p>
821+
* @public
822+
*/
823+
Condition?: Condition | undefined;
824+
807825
/**
808826
* <p>Indicates if the option to pass permissions is granted.</p>
809827
* @public
@@ -1232,6 +1250,12 @@ export interface CreateLakeFormationOptInRequest {
12321250
* @public
12331251
*/
12341252
Resource: Resource | undefined;
1253+
1254+
/**
1255+
* <p>A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.</p>
1256+
* @public
1257+
*/
1258+
Condition?: Condition | undefined;
12351259
}
12361260

12371261
/**
@@ -1369,6 +1393,12 @@ export interface DeleteLakeFormationOptInRequest {
13691393
* @public
13701394
*/
13711395
Resource: Resource | undefined;
1396+
1397+
/**
1398+
* <p>A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.</p>
1399+
* @public
1400+
*/
1401+
Condition?: Condition | undefined;
13721402
}
13731403

13741404
/**
@@ -1623,6 +1653,12 @@ export interface ResourceInfo {
16231653
* @public
16241654
*/
16251655
HybridAccessEnabled?: boolean | undefined;
1656+
1657+
/**
1658+
* <p>Grants the calling principal the permissions to perform all supported Lake Formation operations on the registered data location. </p>
1659+
* @public
1660+
*/
1661+
WithPrivilegedAccess?: boolean | undefined;
16261662
}
16271663

16281664
/**
@@ -1918,18 +1954,6 @@ export interface DetailsMap {
19181954
ResourceShare?: string[] | undefined;
19191955
}
19201956

1921-
/**
1922-
* <p>A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.</p>
1923-
* @public
1924-
*/
1925-
export interface Condition {
1926-
/**
1927-
* <p>An expression written based on the Cedar Policy Language used to match the principal attributes.</p>
1928-
* @public
1929-
*/
1930-
Expression?: string | undefined;
1931-
}
1932-
19331957
/**
19341958
* <p>The permissions granted or revoked on a resource.</p>
19351959
* @public
@@ -2932,6 +2956,12 @@ export interface GrantPermissionsRequest {
29322956
*/
29332957
Permissions: Permission[] | undefined;
29342958

2959+
/**
2960+
* <p>A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.</p>
2961+
* @public
2962+
*/
2963+
Condition?: Condition | undefined;
2964+
29352965
/**
29362966
* <p>Indicates a list of the granted permissions that the principal may pass to other users. These permissions may only be a subset of the permissions granted in the <code>Privileges</code>.</p>
29372967
* @public
@@ -3618,6 +3648,12 @@ export interface RegisterResourceRequest {
36183648
* @public
36193649
*/
36203650
HybridAccessEnabled?: boolean | undefined;
3651+
3652+
/**
3653+
* <p>Grants the calling principal the permissions to perform all supported Lake Formation operations on the registered data location. </p>
3654+
* @public
3655+
*/
3656+
WithPrivilegedAccess?: boolean | undefined;
36213657
}
36223658

36233659
/**
@@ -3688,6 +3724,12 @@ export interface RevokePermissionsRequest {
36883724
*/
36893725
Permissions: Permission[] | undefined;
36903726

3727+
/**
3728+
* <p>A Lake Formation condition, which applies to permissions and opt-ins that contain an expression.</p>
3729+
* @public
3730+
*/
3731+
Condition?: Condition | undefined;
3732+
36913733
/**
36923734
* <p>Indicates a list of permissions for which to revoke the grant option allowing the principal to pass permissions to other principals.</p>
36933735
* @public

0 commit comments

Comments
 (0)