Skip to content

Commit

Permalink
Merge pull request #661 from udondan/iam-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
udondan committed May 1, 2024
2 parents be39aae + 1f32d70 commit d139673
Show file tree
Hide file tree
Showing 18 changed files with 406 additions and 8 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG/v0.635.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**New services:**

- qapps

**New actions:**

- qbusiness:CancelSubscription
- qbusiness:CreateSubscription
- qbusiness:ListSubscriptions
- qbusiness:UpdateSubscription
- timestream:DescribeAccountSettings
- timestream:UpdateAccountSettings

**New resource types:**

- qbusiness:subscription
- sts:self-session
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<!-- stats -->
Support for:

- 392 Services
- 16594 Actions
- 1780 Resource Types
- 393 Services
- 16621 Actions
- 1783 Resource Types
- 1731 Condition keys
<!-- /stats -->

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.634.0
0.635.0
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
author = 'Daniel Schroeder'

# The full version, including alpha/beta/rc tags
release = '0.634.0'
release = '0.635.0'

# -- General configuration ---------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ AWS IAM policy statement generator with fluent interface.
Support for:

- 392 Services
- 16594 Actions
- 1780 Resource Types
- 393 Services
- 16621 Actions
- 1783 Resource Types
- 1731 Condition keys

..
Expand Down
1 change: 1 addition & 0 deletions lib/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export { SmsVoiceV2 } from './policy-statements/pinpointsmsvoicev2';
export { Polly } from './policy-statements/polly';
export { Q } from './policy-statements/q';
export { Qbusiness } from './policy-statements/qbusiness';
export { Qapps } from './policy-statements/qbusinessqapps';
export { Wisdom } from './policy-statements/qinconnect';
export { Qldb } from './policy-statements/qldb';
export { Quicksight } from './policy-statements/quicksight';
Expand Down
53 changes: 53 additions & 0 deletions lib/generated/policy-statements/qbusiness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ export class Qbusiness extends PolicyStatement {
return this.to('BatchPutDocument');
}

/**
* Grants permission to cancel a subscription
*
* Access Level: Write
*/
public toCancelSubscription() {
return this.to('CancelSubscription');
}

/**
* Grants permission to chat using an application
*
Expand Down Expand Up @@ -137,6 +146,15 @@ export class Qbusiness extends PolicyStatement {
return this.to('CreateRetriever');
}

/**
* Grants permission to create a subscription
*
* Access Level: Write
*/
public toCreateSubscription() {
return this.to('CreateSubscription');
}

/**
* Grants permission to create a user
*
Expand Down Expand Up @@ -429,6 +447,15 @@ export class Qbusiness extends PolicyStatement {
return this.to('ListRetrievers');
}

/**
* Grants permission to list subscriptions
*
* Access Level: List
*/
public toListSubscriptions() {
return this.to('ListSubscriptions');
}

/**
* Grants permission to list tags for a resource
*
Expand Down Expand Up @@ -580,6 +607,15 @@ export class Qbusiness extends PolicyStatement {
return this.to('UpdateRetriever');
}

/**
* Grants permission to update a subscription
*
* Access Level: Write
*/
public toUpdateSubscription() {
return this.to('UpdateSubscription');
}

/**
* Grants permission to update a user
*
Expand All @@ -603,12 +639,14 @@ export class Qbusiness extends PolicyStatement {
'AddUserLicenses',
'BatchDeleteDocument',
'BatchPutDocument',
'CancelSubscription',
'CreateApplication',
'CreateDataSource',
'CreateIndex',
'CreateLicense',
'CreatePlugin',
'CreateRetriever',
'CreateSubscription',
'CreateUser',
'CreateWebExperience',
'DeleteApplication',
Expand All @@ -632,6 +670,7 @@ export class Qbusiness extends PolicyStatement {
'UpdateIndex',
'UpdatePlugin',
'UpdateRetriever',
'UpdateSubscription',
'UpdateUser',
'UpdateWebExperience'
],
Expand Down Expand Up @@ -661,6 +700,7 @@ export class Qbusiness extends PolicyStatement {
'ListMessages',
'ListPlugins',
'ListRetrievers',
'ListSubscriptions',
'ListUserLicenses',
'ListWebExperiences'
],
Expand Down Expand Up @@ -779,6 +819,19 @@ export class Qbusiness extends PolicyStatement {
return this.on(`arn:${ partition ?? this.defaultPartition }:qbusiness:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:application/${ applicationId }/user-license/${ userLicenseId }`);
}

/**
* Adds a resource of type subscription to the statement
*
* @param applicationId - Identifier for the applicationId.
* @param subscriptionId - Identifier for the subscriptionId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*/
public onSubscription(applicationId: string, subscriptionId: string, account?: string, region?: string, partition?: string) {
return this.on(`arn:${ partition ?? this.defaultPartition }:qbusiness:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:application/${ applicationId }/subscription/${ subscriptionId }`);
}

/**
* Filters access by the tags that are passed in the request
*
Expand Down

0 comments on commit d139673

Please sign in to comment.