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
8184This 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
9399Start 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
127134Copyright 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