Skip to content

Commit 9216d1d

Browse files
committed
Update metadata
1 parent 229a277 commit 9216d1d

File tree

3 files changed

+54
-18
lines changed

3 files changed

+54
-18
lines changed

.doc_gen/metadata/ec2_metadata.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ ec2_Hello:
8585
snippet_tags:
8686
- swift.ec2.hello.package
8787
- description: The <filename>entry.swift</filename> file.
88+
snippet_tags:
8889
- swift.ec2.hello
8990
services:
9091
ec2: {DescribeSecurityGroups}
@@ -2586,6 +2587,17 @@ ec2_Scenario_GetStartedInstances:
25862587
- description: The main entry point for the scenario.
25872588
snippet_files:
25882589
- rustv1/examples/ec2/src/bin/getting-started.rs
2590+
Swift:
2591+
versions:
2592+
- sdk_version: 1
2593+
github: swift/example_code/ec2
2594+
excerpts:
2595+
- description: The <filename>Package.swift</filename> file.
2596+
snippet_tags:
2597+
- swift.ec2.scenario.package
2598+
- description: The <filename>entry.swift</filename> file.
2599+
snippet_tags:
2600+
- swift.ec2.scenario
25892601
services:
25902602
ec2:
25912603
{

swift/example_code/ec2/README.md

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,37 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `swift
3131

3232
### Get started
3333

34-
- [Hello Amazon EC2](scenario/Package.swift#L8) (`DescribeSecurityGroups`)
34+
- [Hello Amazon EC2](hello/Package.swift#L8) (`DescribeSecurityGroups`)
35+
36+
37+
### Basics
38+
39+
Code examples that show you how to perform the essential operations within a service.
40+
41+
- [Learn the basics](scenario/Package.swift)
3542

3643

3744
### Single actions
3845

3946
Code excerpts that show you how to call individual service functions.
4047

41-
- [AllocateAddress](scenario/Sources/entry.swift#L1015)
42-
- [AssociateAddress](scenario/Sources/entry.swift#L1039)
43-
- [AuthorizeSecurityGroupIngress](scenario/Sources/entry.swift#L928)
48+
- [AllocateAddress](scenario/Sources/entry.swift#L1019)
49+
- [AssociateAddress](scenario/Sources/entry.swift#L1043)
50+
- [AuthorizeSecurityGroupIngress](scenario/Sources/entry.swift#L932)
4451
- [CreateKeyPair](scenario/Sources/entry.swift#L410)
45-
- [CreateSecurityGroup](scenario/Sources/entry.swift#L903)
46-
- [DeleteKeyPair](scenario/Sources/entry.swift#L469)
47-
- [DeleteSecurityGroup](scenario/Sources/entry.swift#L993)
48-
- [DescribeImages](scenario/Sources/entry.swift#L809)
49-
- [DescribeInstanceTypes](scenario/Sources/entry.swift#L537)
50-
- [DescribeKeyPairs](scenario/Sources/entry.swift#L446)
52+
- [CreateSecurityGroup](scenario/Sources/entry.swift#L907)
53+
- [DeleteKeyPair](scenario/Sources/entry.swift#L473)
54+
- [DeleteSecurityGroup](scenario/Sources/entry.swift#L997)
55+
- [DescribeImages](scenario/Sources/entry.swift#L813)
56+
- [DescribeInstanceTypes](scenario/Sources/entry.swift#L541)
57+
- [DescribeKeyPairs](scenario/Sources/entry.swift#L450)
5158
- [DescribeSecurityGroups](hello/Sources/entry.swift#L44)
52-
- [DisassociateAddress](scenario/Sources/entry.swift#L1065)
53-
- [ReleaseAddress](scenario/Sources/entry.swift#L1082)
54-
- [RunInstances](scenario/Sources/entry.swift#L845)
55-
- [StartInstances](scenario/Sources/entry.swift#L711)
56-
- [StopInstances](scenario/Sources/entry.swift#L661)
57-
- [TerminateInstances](scenario/Sources/entry.swift#L760)
59+
- [DisassociateAddress](scenario/Sources/entry.swift#L1069)
60+
- [ReleaseAddress](scenario/Sources/entry.swift#L1086)
61+
- [RunInstances](scenario/Sources/entry.swift#L849)
62+
- [StartInstances](scenario/Sources/entry.swift#L715)
63+
- [StopInstances](scenario/Sources/entry.swift#L665)
64+
- [TerminateInstances](scenario/Sources/entry.swift#L764)
5865

5966

6067
<!--custom.examples.start-->
@@ -84,6 +91,23 @@ and run commands.
8491
This example shows you how to get started using Amazon EC2.
8592

8693

94+
#### Learn the basics
95+
96+
This example shows you how to do the following:
97+
98+
- Create a key pair and security group.
99+
- Select an Amazon Machine Image (AMI) and compatible instance type, then create an instance.
100+
- Stop and restart the instance.
101+
- Associate an Elastic IP address with your instance.
102+
- Connect to your instance with SSH, then clean up resources.
103+
104+
<!--custom.basic_prereqs.ec2_Scenario_GetStartedInstances.start-->
105+
<!--custom.basic_prereqs.ec2_Scenario_GetStartedInstances.end-->
106+
107+
108+
<!--custom.basics.ec2_Scenario_GetStartedInstances.start-->
109+
<!--custom.basics.ec2_Scenario_GetStartedInstances.end-->
110+
87111

88112
### Tests
89113

swift/example_code/ec2/scenario/Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// (swift-tools-version has two lines here because it needs to be the first
66
// line in the file, but it should also appear in the snippet below)
77
//
8-
// snippet-start:[swift.ec2.hello.package]
8+
// snippet-start:[swift.ec2.scenario.package]
99
// swift-tools-version: 5.9
1010
//
1111
// The swift-tools-version declares the minimum version of Swift required to
@@ -45,4 +45,4 @@ let package = Package(
4545

4646
]
4747
)
48-
// snippet-end:[swift.ec2.hello.package]
48+
// snippet-end:[swift.ec2.scenario.package]

0 commit comments

Comments
 (0)