Skip to content

Commit 4b3ea7c

Browse files
committed
metadata done
1 parent 50453d9 commit 4b3ea7c

File tree

6 files changed

+448
-227
lines changed

6 files changed

+448
-227
lines changed

.doc_gen/metadata/ecr_metadata.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ ecr_Hello:
2323
- description:
2424
snippet_tags:
2525
- ecr.java2_hello.main
26+
Python:
27+
versions:
28+
- sdk_version: 3
29+
github: python/example_code/ecr
30+
excerpts:
31+
- description:
32+
snippet_tags:
33+
- python.example_code.ecr.Hello
2634
services:
2735
ecr: {listImages}
2836
ecr_PushImageCmd:
@@ -67,6 +75,18 @@ ecr_SetRepositoryPolicy:
6775
- description:
6876
snippet_tags:
6977
- ecr.java2.set.repo.policy.main
78+
Python:
79+
versions:
80+
- sdk_version: 3
81+
github: python/example_code/ecr
82+
excerpts:
83+
- description:
84+
snippet_tags:
85+
- python.example_code.ecr.ECRWrapper.decl
86+
- python.example_code.ecr.ECRWrapper.SetRepositoryPolicy
87+
- description: Example that grants an IAM role download access.
88+
snippet_tags:
89+
- python.example_code.ecr.grant_role_download_access
7090
services:
7191
ecr: {SetRepositoryPolicy}
7292
ecr_GetRepositoryPolicy:
@@ -89,6 +109,15 @@ ecr_GetRepositoryPolicy:
89109
- description:
90110
snippet_tags:
91111
- ecr.java2.get.repo.policy.main
112+
Python:
113+
versions:
114+
- sdk_version: 3
115+
github: python/example_code/ecr
116+
excerpts:
117+
- description:
118+
snippet_tags:
119+
- python.example_code.ecr.ECRWrapper.decl
120+
- python.example_code.ecr.ECRWrapper.GetRepositoryPolicy
92121
services:
93122
ecr: {GetRepositoryPolicy}
94123
ecr_GetAuthorizationToken:
@@ -111,6 +140,15 @@ ecr_GetAuthorizationToken:
111140
- description:
112141
snippet_tags:
113142
- ecr.java2.get.token.main
143+
Python:
144+
versions:
145+
- sdk_version: 3
146+
github: python/example_code/ecr
147+
excerpts:
148+
- description:
149+
snippet_tags:
150+
- python.example_code.ecr.ECRWrapper.decl
151+
- python.example_code.ecr.ECRWrapper.GetAuthorizationToken
114152
services:
115153
ecr: {GetAuthorizationToken}
116154
ecr_StartLifecyclePolicyPreview:
@@ -135,6 +173,22 @@ ecr_StartLifecyclePolicyPreview:
135173
- ecr.java2.verify.image.main
136174
services:
137175
ecr: {StartLifecyclePolicyPreview}
176+
ecr_PutLifeCyclePolicy:
177+
languages:
178+
Python:
179+
versions:
180+
- sdk_version: 3
181+
github: python/example_code/ecr
182+
excerpts:
183+
- description:
184+
snippet_tags:
185+
- python.example_code.ecr.ECRWrapper.decl
186+
- python.example_code.ecr.ECRWrapper.PutLifeCyclePolicy
187+
- description: Example that puts an expiration date policy.
188+
snippet_tags:
189+
- python.example_code.ecr.put_expiration_policy
190+
services:
191+
ecr: {PutLifeCyclePolicy}
138192
ecr_DescribeImages:
139193
languages:
140194
Kotlin:
@@ -155,6 +209,15 @@ ecr_DescribeImages:
155209
- description:
156210
snippet_tags:
157211
- ecr.java2.verify.image.main
212+
Python:
213+
versions:
214+
- sdk_version: 3
215+
github: python/example_code/ecr
216+
excerpts:
217+
- description:
218+
snippet_tags:
219+
- python.example_code.ecr.ECRWrapper.decl
220+
- python.example_code.ecr.ECRWrapper.DescribeImages
158221
services:
159222
ecr: {DescribeImages}
160223
ecr_DeleteRepository:
@@ -177,6 +240,15 @@ ecr_DeleteRepository:
177240
- description:
178241
snippet_tags:
179242
- ecr.java2.delete.repo.main
243+
Python:
244+
versions:
245+
- sdk_version: 3
246+
github: python/example_code/ecr
247+
excerpts:
248+
- description:
249+
snippet_tags:
250+
- python.example_code.ecr.ECRWrapper.decl
251+
- python.example_code.ecr.ECRWrapper.DeleteRepository
180252
services:
181253
ecr: {DeleteRepository}
182254
ecr_CreateRepository:
@@ -199,6 +271,15 @@ ecr_CreateRepository:
199271
- description:
200272
snippet_tags:
201273
- ecr.java2.create.repo.main
274+
Python:
275+
versions:
276+
- sdk_version: 3
277+
github: python/example_code/ecr
278+
excerpts:
279+
- description:
280+
snippet_tags:
281+
- python.example_code.ecr.ECRWrapper.decl
282+
- python.example_code.ecr.ECRWrapper.CreateRepository
202283
services:
203284
ecr: {CreateRepository}
204285
ecr_DescribeRepositories:
@@ -230,6 +311,15 @@ ecr_DescribeRepositories:
230311
- description:
231312
snippet_tags:
232313
- ecr.rust.describe-repos
314+
Python:
315+
versions:
316+
- sdk_version: 3
317+
github: python/example_code/ecr
318+
excerpts:
319+
- description:
320+
snippet_tags:
321+
- python.example_code.ecr.ECRWrapper.decl
322+
- python.example_code.ecr.ECRWrapper.DescribeRepositories
233323
services:
234324
ecr: {DescribeRepositories}
235325
ecr_ListImages:
@@ -282,5 +372,19 @@ ecr_Scenario_RepositoryManagement:
282372
- description: A wrapper class for &ECR; SDK methods.
283373
snippet_tags:
284374
- ecr.java2_scenario.main
375+
Python:
376+
versions:
377+
- sdk_version: 3
378+
github: python/example_code/ecr
379+
sdkguide:
380+
excerpts:
381+
- description: Run an interactive scenario at a command prompt.
382+
genai: some
383+
snippet_tags:
384+
- python.example_code.ecr.BasicsScenario
385+
- description: ECRWrapper class that wraps &ECR; actions.
386+
genai: some
387+
snippet_tags:
388+
- python.example_code.ecr.ECRWrapper.class
285389
services:
286390
ecr: {CreateRepository, DescribeRepositories, DeleteRepository, DescribeImages, StartLifecyclePolicyPreview, GetAuthorizationToken, GetRepositoryPolicy, SetRepositoryPolicy}

python/example_code/ecr/README.md

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# EventBridge Scheduler code examples for the SDK for Python
1+
# Amazon ECR code examples for the SDK for Python
22

33
## Overview
44

5-
Shows how to use the AWS SDK for Python (Boto3) to work with Amazon EventBridge Scheduler.
5+
Shows how to use the AWS SDK for Python (Boto3) to work with Amazon Elastic Container Registry (Amazon ECR).
66

77
<!--custom.overview.start-->
88
<!--custom.overview.end-->
99

10-
_EventBridge Scheduler allows you to create, run, and manage tasks on a schedule from one central, managed service._
10+
_Amazon ECR is a fully managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images._
1111

1212
## ⚠ Important
1313

@@ -36,24 +36,28 @@ python -m pip install -r requirements.txt
3636

3737
### Get started
3838

39-
- [Hello EventBridge Scheduler](hello/hello_scheduler.py#L4) (`ListSchedules`)
39+
- [Hello Amazon ECR](hello/hello_ecr.py#L4) (`listImages`)
4040

4141

42-
### Single actions
42+
### Basics
4343

44-
Code excerpts that show you how to call individual service functions.
44+
Code examples that show you how to perform the essential operations within a service.
4545

46-
- [CreateSchedule](scheduler_wrapper.py#L38)
47-
- [CreateScheduleGroup](scheduler_wrapper.py#L131)
48-
- [DeleteSchedule](scheduler_wrapper.py#L104)
49-
- [DeleteScheduleGroup](scheduler_wrapper.py#L160)
46+
- [Learn the basics](ecr_getting_started.py)
5047

51-
### Scenarios
5248

53-
Code examples that show you how to accomplish a specific task by calling multiple
54-
functions within the same service.
49+
### Single actions
5550

56-
- [Scheduled Events workflow](scenario/scheduler_scenario.py)
51+
Code excerpts that show you how to call individual service functions.
52+
53+
- [CreateRepository](ecr_wrapper.py#L38)
54+
- [DeleteRepository](ecr_wrapper.py#L66)
55+
- [DescribeImages](ecr_wrapper.py#L207)
56+
- [DescribeRepositories](ecr_wrapper.py#L161)
57+
- [GetAuthorizationToken](ecr_wrapper.py#L142)
58+
- [GetRepositoryPolicy](ecr_wrapper.py#L115)
59+
- [PutLifeCyclePolicy](ecr_wrapper.py#L183)
60+
- [SetRepositoryPolicy](ecr_wrapper.py#L88)
5761

5862

5963
<!--custom.examples.start-->
@@ -67,38 +71,41 @@ functions within the same service.
6771
<!--custom.instructions.start-->
6872
<!--custom.instructions.end-->
6973

70-
#### Hello EventBridge Scheduler
74+
#### Hello Amazon ECR
7175

72-
This example shows you how to get started using EventBridge Scheduler.
76+
This example shows you how to get started using Amazon ECR.
7377

7478
```
75-
python hello/hello_scheduler.py
79+
python hello/hello_ecr.py
7680
```
7781

78-
79-
#### Scheduled Events workflow
82+
#### Learn the basics
8083

8184
This example shows you how to do the following:
8285

83-
- Deploy a CloudFormation stack with required resources.
84-
- Create a EventBridge Scheduler schedule group.
85-
- Create a one-time EventBridge Scheduler schedule with a flexible time window.
86-
- Create a recurring EventBridge Scheduler schedule with a specified rate.
87-
- Delete EventBridge Scheduler the schedule and schedule group.
88-
- Clean up resources and delete the stack.
86+
- Create an Amazon ECR repository.
87+
- Set repository policies.
88+
- Retrieve repository URIs.
89+
- Get Amazon ECR authorization tokens.
90+
- Set lifecycle policies for Amazon ECR repositories.
91+
- Push a Docker image to an Amazon ECR repository.
92+
- Verify the existence of an image in an Amazon ECR repository.
93+
- List Amazon ECR repositories for your account and get details about them.
94+
- Delete Amazon ECR repositories.
8995

90-
<!--custom.scenario_prereqs.scheduler_ScheduledEventsWorkflow.start-->
91-
<!--custom.scenario_prereqs.scheduler_ScheduledEventsWorkflow.end-->
96+
<!--custom.basic_prereqs.ecr_Scenario_RepositoryManagement.start-->
97+
<!--custom.basic_prereqs.ecr_Scenario_RepositoryManagement.end-->
9298

9399
Start the example by running the following at a command prompt:
94100

95101
```
96-
python scenario/scheduler_scenario.py
102+
python ecr_getting_started.py
97103
```
98104

99105

100-
<!--custom.scenarios.scheduler_ScheduledEventsWorkflow.start-->
101-
<!--custom.scenarios.scheduler_ScheduledEventsWorkflow.end-->
106+
<!--custom.basics.ecr_Scenario_RepositoryManagement.start-->
107+
<!--custom.basics.ecr_Scenario_RepositoryManagement.end-->
108+
102109

103110
### Tests
104111

@@ -115,9 +122,9 @@ in the `python` folder.
115122

116123
## Additional resources
117124

118-
- [EventBridge Scheduler User Guide](https://docs.aws.amazon.com/scheduler/latest/userguide/intro.html)
119-
- [EventBridge Scheduler API Reference](https://docs.aws.amazon.com/scheduler/latest/apireference/Welcome.html)
120-
- [SDK for Python EventBridge Scheduler reference](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/scheduler.html)
125+
- [Amazon ECR User Guide](https://docs.aws.amazon.com/AmazonECR/latest/userguide/what-is-ecr.html)
126+
- [Amazon ECR API Reference](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/Welcome.html)
127+
- [SDK for Python Amazon ECR reference](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/scheduler.html)
121128

122129
<!--custom.resources.start-->
123130
<!--custom.resources.end-->
@@ -126,4 +133,4 @@ in the `python` folder.
126133

127134
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
128135

129-
SPDX-License-Identifier: Apache-2.0
136+
SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)