Skip to content

Commit

Permalink
Merge pull request #1103 from udondan/iam-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
udondan authored Jan 25, 2025
2 parents 748e62e + 63da837 commit f692481
Show file tree
Hide file tree
Showing 15 changed files with 117 additions and 14 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG/v0.667.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**New actions:**

- connect:DeleteContactFlowVersion
- healthlake:GetExportedFile
- healthlake:StartFHIRExportJobWithGet

**New condition keys:**

- datazone:domainId
- datazone:projectId
- datazone:userId
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
Support for:

- 417 Services
- 18219 Actions
- 18222 Actions
- 1960 Resource Types
- 1906 Condition keys
- 1909 Condition keys
<!-- /stats -->

![EXPERIMENTAL](https://img.shields.io/badge/stability-experimantal-orange?style=for-the-badge)**<br>This is an early version of the package. The API will change while I implement new features. Therefore make sure you use an exact version in your `package.json` before it reaches 1.0.0.**
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.666.0
0.667.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.666.0'
release = '0.667.0'

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

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

- 417 Services
- 18219 Actions
- 18222 Actions
- 1960 Resource Types
- 1906 Condition keys
- 1909 Condition keys

..
/stats
Expand Down
8 changes: 4 additions & 4 deletions lib/generated/policy-statements/cloudwatchlogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ export class Logs extends PolicyStatement {
}

/**
* Grants permission to delete a data protection policy attached to an account
* Grants permission to delete an account policy
*
* Access Level: Write
*
* https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteDataProtectionPolicy.html
* https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteAccountPolicy.html
*/
public toDeleteAccountPolicy() {
return this.to('DeleteAccountPolicy');
Expand Down Expand Up @@ -328,7 +328,7 @@ export class Logs extends PolicyStatement {
}

/**
* Grants permission to retrieve a data protection policy attached to an account
* Grants permission to retrieve account policies
*
* Access Level: List
*
Expand Down Expand Up @@ -779,7 +779,7 @@ export class Logs extends PolicyStatement {
}

/**
* Grants permission to attach a data protection policy at account level to detect and redact sensitive information from log events
* Grants permission to attach an account policy
*
* Access Level: Write
*
Expand Down
20 changes: 20 additions & 0 deletions lib/generated/policy-statements/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,22 @@ export class Connect extends PolicyStatement {
return this.to('DeleteContactFlowModule');
}

/**
* Grants permission to delete a version of a flow in an Amazon Connect instance
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsResourceTag()
* - .ifInstanceId()
* - .ifFlowType()
*
* https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteContactFlowVersion.html
*/
public toDeleteContactFlowVersion() {
return this.to('DeleteContactFlowVersion');
}

/**
* Grants permission to delete an email address resource in an Amazon Connect instance
*
Expand Down Expand Up @@ -4447,6 +4463,7 @@ export class Connect extends PolicyStatement {
'DeleteContactEvaluation',
'DeleteContactFlow',
'DeleteContactFlowModule',
'DeleteContactFlowVersion',
'DeleteEmailAddress',
'DeleteEvaluationForm',
'DeleteHoursOfOperation',
Expand Down Expand Up @@ -5378,6 +5395,7 @@ export class Connect extends PolicyStatement {
* - .toDeleteContactEvaluation()
* - .toDeleteContactFlow()
* - .toDeleteContactFlowModule()
* - .toDeleteContactFlowVersion()
* - .toDeleteEmailAddress()
* - .toDeleteEvaluationForm()
* - .toDeleteHoursOfOperation()
Expand Down Expand Up @@ -5598,6 +5616,7 @@ export class Connect extends PolicyStatement {
* - .toCreateContactFlow()
* - .toCreateContactFlowVersion()
* - .toDeleteContactFlow()
* - .toDeleteContactFlowVersion()
* - .toDescribeContactFlow()
* - .toListContactFlowVersions()
* - .toSearchContactFlows()
Expand Down Expand Up @@ -5672,6 +5691,7 @@ export class Connect extends PolicyStatement {
* - .toDeleteContactEvaluation()
* - .toDeleteContactFlow()
* - .toDeleteContactFlowModule()
* - .toDeleteContactFlowVersion()
* - .toDeleteEmailAddress()
* - .toDeleteEvaluationForm()
* - .toDeleteHoursOfOperation()
Expand Down
36 changes: 36 additions & 0 deletions lib/generated/policy-statements/datazone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1948,4 +1948,40 @@ export class Datazone extends PolicyStatement {
public ifAwsTagKeys(value: string | string[], operator?: Operator | string) {
return this.if(`aws:TagKeys`, value, operator ?? 'StringLike');
}

/**
* Filters access by the domain ID passed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#amazondatazone-policy-keys
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifDomainId(value: string | string[], operator?: Operator | string) {
return this.if(`domainId`, value, operator ?? 'StringLike');
}

/**
* Filters access by the project ID passed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#amazondatazone-policy-keys
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifProjectId(value: string | string[], operator?: Operator | string) {
return this.if(`projectId`, value, operator ?? 'StringLike');
}

/**
* Filters access by the user ID passed in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#amazondatazone-policy-keys
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
public ifUserId(value: string | string[], operator?: Operator | string) {
return this.if(`userId`, value, operator ?? 'StringLike');
}
}
8 changes: 8 additions & 0 deletions lib/generated/policy-statements/ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11969,6 +11969,7 @@ export class Ec2 extends PolicyStatement {
* - .ifAttribute()
* - .ifAttribute()
* - .ifRegion()
* - .ifResourceTag()
*/
public onTrafficMirrorFilterRule(trafficMirrorFilterRuleId: string, account?: string, region?: string, partition?: string) {
return this.on(`arn:${ partition ?? this.defaultPartition }:ec2:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:traffic-mirror-filter-rule/${ trafficMirrorFilterRuleId }`);
Expand Down Expand Up @@ -12662,6 +12663,7 @@ export class Ec2 extends PolicyStatement {
* - .toCreateSnapshot()
* - .toCreateSnapshots()
* - .toCreateSubnet()
* - .toCreateTags()
* - .toCreateTrafficMirrorFilter()
* - .toCreateTrafficMirrorFilterRule()
* - .toCreateTrafficMirrorSession()
Expand All @@ -12681,11 +12683,13 @@ export class Ec2 extends PolicyStatement {
* - .toCreateVerifiedAccessTrustProvider()
* - .toCreateVolume()
* - .toCreateVpc()
* - .toCreateVpcBlockPublicAccessExclusion()
* - .toCreateVpcEndpoint()
* - .toCreateVpcEndpointServiceConfiguration()
* - .toCreateVpcPeeringConnection()
* - .toCreateVpnConnection()
* - .toCreateVpnGateway()
* - .toDeleteTags()
* - .toExportImage()
* - .toImportImage()
* - .toImportKeyPair()
Expand Down Expand Up @@ -13371,6 +13375,7 @@ export class Ec2 extends PolicyStatement {
* - .toCreateSnapshot()
* - .toCreateSnapshots()
* - .toCreateSubnet()
* - .toCreateTags()
* - .toCreateTrafficMirrorFilter()
* - .toCreateTrafficMirrorFilterRule()
* - .toCreateTrafficMirrorSession()
Expand All @@ -13390,6 +13395,7 @@ export class Ec2 extends PolicyStatement {
* - .toCreateVerifiedAccessTrustProvider()
* - .toCreateVolume()
* - .toCreateVpc()
* - .toCreateVpcBlockPublicAccessExclusion()
* - .toCreateVpcEndpoint()
* - .toCreateVpcEndpointServiceConfiguration()
* - .toCreateVpcPeeringConnection()
Expand Down Expand Up @@ -14946,6 +14952,7 @@ export class Ec2 extends PolicyStatement {
* - .toPauseVolumeIO()
* - .toRebootInstances()
* - .toReplaceIamInstanceProfileAssociation()
* - .toReportInstanceStatus()
* - .toResetInstanceAttribute()
* - .toRunInstances()
* - .toSendDiagnosticInterrupt()
Expand Down Expand Up @@ -17868,6 +17875,7 @@ export class Ec2 extends PolicyStatement {
* - subnet-cidr-reservation
* - subnet
* - traffic-mirror-filter
* - traffic-mirror-filter-rule
* - traffic-mirror-session
* - traffic-mirror-target
* - transit-gateway-attachment
Expand Down
24 changes: 24 additions & 0 deletions lib/generated/policy-statements/healthlake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ export class Healthlake extends PolicyStatement {
return this.to('GetCapabilities');
}

/**
* Grants permission to access exported files from a FHIR Export job initiated with Get
*
* Access Level: Read
*
* https://docs.aws.amazon.com/healthlake/latest/devguide/export-datastore-rest.html
*/
public toGetExportedFile() {
return this.to('GetExportedFile');
}

/**
* Grants permission to list all FHIR datastores that are in the user's account, regardless of datastore status
*
Expand Down Expand Up @@ -231,6 +242,17 @@ export class Healthlake extends PolicyStatement {
return this.to('StartFHIRExportJob');
}

/**
* Grants permission to begin a FHIR Export job with Get
*
* Access Level: Write
*
* https://docs.aws.amazon.com/healthlake/latest/devguide/export-datastore-rest.html
*/
public toStartFHIRExportJobWithGet() {
return this.to('StartFHIRExportJobWithGet');
}

/**
* Grants permission to begin a FHIR Export job with Post
*
Expand Down Expand Up @@ -302,6 +324,7 @@ export class Healthlake extends PolicyStatement {
'DeleteFHIRDatastore',
'DeleteResource',
'StartFHIRExportJob',
'StartFHIRExportJobWithGet',
'StartFHIRExportJobWithPost',
'StartFHIRImportJob',
'UpdateResource'
Expand All @@ -312,6 +335,7 @@ export class Healthlake extends PolicyStatement {
'DescribeFHIRExportJobWithGet',
'DescribeFHIRImportJob',
'GetCapabilities',
'GetExportedFile',
'ReadResource',
'SearchEverything',
'SearchWithGet',
Expand Down
2 changes: 0 additions & 2 deletions lib/generated/policy-statements/iot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1788,8 +1788,6 @@ export class Iot extends PolicyStatement {
* Grants permission to get the thing's connectivity data
*
* Access Level: Read
*
* https://docs.aws.amazon.com/iot/latest/developerguide/policy-actions.html
*/
public toGetThingConnectivityData() {
return this.to('GetThingConnectivityData');
Expand Down
4 changes: 2 additions & 2 deletions lib/generated/policy-statements/route53resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export class Route53resolver extends PolicyStatement {
}

/**
* Grants permission to list all the Firewall domain under a speicfied Firewall domain list
* Grants permission to list all the Firewall domain under a specified Firewall domain list
*
* Access Level: List
*
Expand Down Expand Up @@ -564,7 +564,7 @@ export class Route53resolver extends PolicyStatement {
}

/**
* Grants permission to list all the Firewall rule under a speicfied Firewall rule group
* Grants permission to list all the Firewall rule under a specified Firewall rule group
*
* Access Level: List
*
Expand Down
1 change: 1 addition & 0 deletions stats/actions/connect
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ connect:DeleteAttachedFile;Write
connect:DeleteContactEvaluation;Write
connect:DeleteContactFlow;Write
connect:DeleteContactFlowModule;Write
connect:DeleteContactFlowVersion;Write
connect:DeleteEmailAddress;Write
connect:DeleteEvaluationForm;Write
connect:DeleteHoursOfOperation;Write
Expand Down
2 changes: 2 additions & 0 deletions stats/actions/healthlake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ healthlake:DescribeFHIRExportJob;Read
healthlake:DescribeFHIRExportJobWithGet;Read
healthlake:DescribeFHIRImportJob;Read
healthlake:GetCapabilities;Read
healthlake:GetExportedFile;Read
healthlake:ListFHIRDatastores;List
healthlake:ListFHIRExportJobs;List
healthlake:ListFHIRImportJobs;List
Expand All @@ -17,6 +18,7 @@ healthlake:SearchEverything;Read
healthlake:SearchWithGet;Read
healthlake:SearchWithPost;Read
healthlake:StartFHIRExportJob;Write
healthlake:StartFHIRExportJobWithGet;Write
healthlake:StartFHIRExportJobWithPost;Write
healthlake:StartFHIRImportJob;Write
healthlake:TagResource;Tagging
Expand Down
3 changes: 3 additions & 0 deletions stats/conditions/datazone
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
datazone:RequestTag/${TagKey}
datazone:ResourceTag/${TagKey}
datazone:TagKeys
datazone:domainId
datazone:projectId
datazone:userId

0 comments on commit f692481

Please sign in to comment.