Skip to content

Commit cbd212c

Browse files
authored
Merge pull request #1907 from udondan/iam-updates
2 parents f3c711f + 3a24008 commit cbd212c

File tree

15 files changed

+381
-15
lines changed

15 files changed

+381
-15
lines changed

CHANGELOG/v0.753.0.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
**New services:**
2+
3+
- elemental-inference
4+
5+
**New actions:**
6+
7+
- healthlake:InquirePreAuthClaim
8+
- healthlake:QuestionnairePackage
9+
- healthlake:SubmitPreAuthClaim
10+
11+
**New resource types:**
12+
13+
- mediaconnect:MediaStream
14+
- mediaconnect:VpcInterface

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
<!-- stats -->
1616
Support for:
1717

18-
- 442 Services
19-
- 20311 Actions
20-
- 2151 Resource Types
21-
- 2273 Condition keys
18+
- 443 Services
19+
- 20326 Actions
20+
- 2154 Resource Types
21+
- 2276 Condition keys
2222
<!-- /stats -->
2323

2424
![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.**

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.752.0
1+
0.753.0

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
author = 'Daniel Schroeder'
2525

2626
# The full version, including alpha/beta/rc tags
27-
release = '0.752.0'
27+
release = '0.753.0'
2828

2929
# -- General configuration ---------------------------------------------------
3030

docs/source/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ AWS IAM policy statement generator with fluent interface.
3030
3131
Support for:
3232

33-
- 442 Services
34-
- 20311 Actions
35-
- 2151 Resource Types
36-
- 2273 Condition keys
33+
- 443 Services
34+
- 20326 Actions
35+
- 2154 Resource Types
36+
- 2276 Condition keys
3737

3838
..
3939
/stats

lib/generated/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ export { Elasticloadbalancing } from './policy-statements/elasticloadbalancing';
290290
export { ElasticloadbalancingV2 } from './policy-statements/elasticloadbalancingv2';
291291
export { ElementalAppliancesSoftware } from './policy-statements/elementalappliancesandsoftware';
292292
export { ElementalActivations } from './policy-statements/elementalappliancesandsoftwareactivationservice';
293+
export { ElementalInference } from './policy-statements/elementalinference';
293294
export { Mediaconnect } from './policy-statements/elementalmediaconnect';
294295
export { Mediaconvert } from './policy-statements/elementalmediaconvert';
295296
export { Medialive } from './policy-statements/elementalmedialive';
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
import { AccessLevelList } from '../../shared/access-level';
2+
import { PolicyStatement, Operator } from '../../shared';
3+
4+
/**
5+
* Statement provider for service [elemental-inference](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalinference.html).
6+
*
7+
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
8+
*/
9+
export class ElementalInference extends PolicyStatement {
10+
public servicePrefix = 'elemental-inference';
11+
12+
/**
13+
* Statement provider for service [elemental-inference](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalinference.html).
14+
*
15+
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
16+
*/
17+
constructor(sid?: string) {
18+
super(sid);
19+
}
20+
21+
/**
22+
* Grants permission to associate a feed with an AWS resource
23+
*
24+
* Access Level: Write
25+
*
26+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_AssociateFeed.html
27+
*/
28+
public toAssociateFeed() {
29+
return this.to('AssociateFeed');
30+
}
31+
32+
/**
33+
* Grants permission to create a new feed
34+
*
35+
* Access Level: Write
36+
*
37+
* Possible conditions:
38+
* - .ifAwsRequestTag()
39+
* - .ifAwsTagKeys()
40+
*
41+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_CreateFeed.html
42+
*/
43+
public toCreateFeed() {
44+
return this.to('CreateFeed');
45+
}
46+
47+
/**
48+
* Grants permission to delete a feed
49+
*
50+
* Access Level: Write
51+
*
52+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_DeleteFeed.html
53+
*/
54+
public toDeleteFeed() {
55+
return this.to('DeleteFeed');
56+
}
57+
58+
/**
59+
* Grants permission to disassociate a feed from an AWS resource
60+
*
61+
* Access Level: Write
62+
*
63+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_DisassociateFeed.html
64+
*/
65+
public toDisassociateFeed() {
66+
return this.to('DisassociateFeed');
67+
}
68+
69+
/**
70+
* Grants permission to get feed details
71+
*
72+
* Access Level: Read
73+
*
74+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_GetFeed.html
75+
*/
76+
public toGetFeed() {
77+
return this.to('GetFeed');
78+
}
79+
80+
/**
81+
* Grants permission to retrieve metadata for a specific feed output
82+
*
83+
* Access Level: Write
84+
*
85+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_GetMetadata.html
86+
*/
87+
public toGetMetadata() {
88+
return this.to('GetMetadata');
89+
}
90+
91+
/**
92+
* Grants permission to list feeds in the account
93+
*
94+
* Access Level: List
95+
*
96+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_ListFeeds.html
97+
*/
98+
public toListFeeds() {
99+
return this.to('ListFeeds');
100+
}
101+
102+
/**
103+
* Grants permission to list tags on a resource
104+
*
105+
* Access Level: Read
106+
*
107+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_ListTagsForResource.html
108+
*/
109+
public toListTagsForResource() {
110+
return this.to('ListTagsForResource');
111+
}
112+
113+
/**
114+
* Grants permission to upload media data for a specified feed
115+
*
116+
* Access Level: Write
117+
*
118+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_PutMedia.html
119+
*/
120+
public toPutMedia() {
121+
return this.to('PutMedia');
122+
}
123+
124+
/**
125+
* Grants permission to add tags to a resource
126+
*
127+
* Access Level: Tagging
128+
*
129+
* Possible conditions:
130+
* - .ifAwsRequestTag()
131+
* - .ifAwsTagKeys()
132+
*
133+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_TagResource.html
134+
*/
135+
public toTagResource() {
136+
return this.to('TagResource');
137+
}
138+
139+
/**
140+
* Grants permission to remove tags from a resource
141+
*
142+
* Access Level: Tagging
143+
*
144+
* Possible conditions:
145+
* - .ifAwsTagKeys()
146+
*
147+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_UntagResource.html
148+
*/
149+
public toUntagResource() {
150+
return this.to('UntagResource');
151+
}
152+
153+
/**
154+
* Grants permission to update feed configuration
155+
*
156+
* Access Level: Write
157+
*
158+
* https://docs.aws.amazon.com/elemental-inference/latest/api/API_UpdateFeed.html
159+
*/
160+
public toUpdateFeed() {
161+
return this.to('UpdateFeed');
162+
}
163+
164+
protected accessLevelList: AccessLevelList = {
165+
Write: [
166+
'AssociateFeed',
167+
'CreateFeed',
168+
'DeleteFeed',
169+
'DisassociateFeed',
170+
'GetMetadata',
171+
'PutMedia',
172+
'UpdateFeed'
173+
],
174+
Read: [
175+
'GetFeed',
176+
'ListTagsForResource'
177+
],
178+
List: [
179+
'ListFeeds'
180+
],
181+
Tagging: [
182+
'TagResource',
183+
'UntagResource'
184+
]
185+
};
186+
187+
/**
188+
* Adds a resource of type FeedResource to the statement
189+
*
190+
* https://docs.aws.amazon.com/elemental-inference/latest/APIReference/API_Feed.html
191+
*
192+
* @param id - Identifier for the id.
193+
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
194+
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
195+
* @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.
196+
*
197+
* Possible conditions:
198+
* - .ifAwsResourceTag()
199+
*/
200+
public onFeedResource(id: string, account?: string, region?: string, partition?: string) {
201+
return this.on(`arn:${ partition ?? this.defaultPartition }:elemental-inference:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:feed/${ id }`);
202+
}
203+
204+
/**
205+
* Filters access by tags that are passed in the request
206+
*
207+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag
208+
*
209+
* Applies to actions:
210+
* - .toCreateFeed()
211+
* - .toTagResource()
212+
*
213+
* @param tagKey The tag key to check
214+
* @param value The value(s) to check
215+
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
216+
*/
217+
public ifAwsRequestTag(tagKey: string, value: string | string[], operator?: Operator | string) {
218+
return this.if(`aws:RequestTag/${ tagKey }`, value, operator ?? 'StringLike');
219+
}
220+
221+
/**
222+
* Filters access by tags associated with the resource
223+
*
224+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
225+
*
226+
* Applies to resource types:
227+
* - FeedResource
228+
*
229+
* @param tagKey The tag key to check
230+
* @param value The value(s) to check
231+
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
232+
*/
233+
public ifAwsResourceTag(tagKey: string, value: string | string[], operator?: Operator | string) {
234+
return this.if(`aws:ResourceTag/${ tagKey }`, value, operator ?? 'StringLike');
235+
}
236+
237+
/**
238+
* Filters access by tag keys that are passed in the request
239+
*
240+
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys
241+
*
242+
* Applies to actions:
243+
* - .toCreateFeed()
244+
* - .toTagResource()
245+
* - .toUntagResource()
246+
*
247+
* @param value The value(s) to check
248+
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
249+
*/
250+
public ifAwsTagKeys(value: string | string[], operator?: Operator | string) {
251+
return this.if(`aws:TagKeys`, value, operator ?? 'StringLike');
252+
}
253+
}

0 commit comments

Comments
 (0)