1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
%global _empty_manifest_terminate_build 0
Name: python-aws-cdk.aws-cloud9-alpha
Version: 2.81.0a0
Release: 1
Summary: The CDK Construct Library for AWS::Cloud9
License: Apache-2.0
URL: https://github.com/aws/aws-cdk
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b9/bd/12c8eda0adf11488de43a87045d79736523cb72a0ff9d21628266ff7a15c/aws-cdk.aws-cloud9-alpha-2.81.0a0.tar.gz
BuildArch: noarch
Requires: python3-aws-cdk-lib
Requires: python3-constructs
Requires: python3-jsii
Requires: python3-publication
Requires: python3-typeguard
%description
<!--END STABILITY BANNER-->
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a
browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular
programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your
development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your
office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing
serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of
serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair
program and track each other's inputs in real time.
## Creating EC2 Environment
EC2 Environments are defined with `Ec2Environment`. To create an EC2 environment in the private subnet, specify
`subnetSelection` with private `subnetType`.
```python
# create a cloud9 ec2 environment in a new VPC
vpc = ec2.Vpc(self, "VPC", max_azs=3)
cloud9.Ec2Environment(self, "Cloud9Env", vpc=vpc, image_id=cloud9.ImageId.AMAZON_LINUX_2)
# or create the cloud9 environment in the default VPC with specific instanceType
default_vpc = ec2.Vpc.from_lookup(self, "DefaultVPC", is_default=True)
cloud9.Ec2Environment(self, "Cloud9Env2",
vpc=default_vpc,
instance_type=ec2.InstanceType("t3.large"),
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
# or specify in a different subnetSelection
c9env = cloud9.Ec2Environment(self, "Cloud9Env3",
vpc=vpc,
subnet_selection=ec2.SubnetSelection(
subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS
),
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
# print the Cloud9 IDE URL in the output
CfnOutput(self, "URL", value=c9env.ide_url)
```
## Specifying EC2 AMI
Use `imageId` to specify the EC2 AMI image to be used:
```python
default_vpc = ec2.Vpc.from_lookup(self, "DefaultVPC", is_default=True)
cloud9.Ec2Environment(self, "Cloud9Env2",
vpc=default_vpc,
instance_type=ec2.InstanceType("t3.large"),
image_id=cloud9.ImageId.UBUNTU_18_04
)
```
## Cloning Repositories
Use `clonedRepositories` to clone one or multiple AWS Codecommit repositories into the environment:
```python
import aws_cdk.aws_codecommit as codecommit
# create a new Cloud9 environment and clone the two repositories
# vpc: ec2.Vpc
# create a codecommit repository to clone into the cloud9 environment
repo_new = codecommit.Repository(self, "RepoNew",
repository_name="new-repo"
)
# import an existing codecommit repository to clone into the cloud9 environment
repo_existing = codecommit.Repository.from_repository_name(self, "RepoExisting", "existing-repo")
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
cloned_repositories=[
cloud9.CloneRepository.from_code_commit(repo_new, "/src/new-repo"),
cloud9.CloneRepository.from_code_commit(repo_existing, "/src/existing-repo")
],
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
```
## Specifying Owners
Every Cloud9 Environment has an **owner**. An owner has full control over the environment, and can invite additional members to the environment for collaboration purposes. For more information, see [Working with shared environments in AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html)).
By default, the owner will be the identity that creates the Environment, which is most likely your CloudFormation Execution Role when the Environment is created using CloudFormation. Provider a value for the `owner` property to assign a different owner, either a specific IAM User or the AWS Account Root User.
`Owner` is a user that owns a Cloud9 environment . `Owner` has their own access permissions, resources. And we can specify an `Owner`in an Ec2 environment which could be of two types, 1. AccountRoot and 2. Iam User. It allows AWS to determine who has permissions to manage the environment, either an IAM user or the account root user (but using the account root user is not recommended, see [environment sharing best practices](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html#share-environment-best-practices)).
To specify the AWS Account Root User as the environment owner, use `Owner.accountRoot()`
```python
# vpc: ec2.Vpc
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
image_id=cloud9.ImageId.AMAZON_LINUX_2,
owner=cloud9.Owner.account_root("111111111")
)
```
To specify a specific IAM User as the environment owner, use `Owner.user()`. The user should have the `AWSCloud9Administrator` managed policy
```python
import aws_cdk.aws_iam as iam
# vpc: ec2.Vpc
user = iam.User(self, "user")
user.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name("AWSCloud9Administrator"))
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
image_id=cloud9.ImageId.AMAZON_LINUX_2,
owner=cloud9.Owner.user(user)
)
```
%package -n python3-aws-cdk.aws-cloud9-alpha
Summary: The CDK Construct Library for AWS::Cloud9
Provides: python-aws-cdk.aws-cloud9-alpha
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-aws-cdk.aws-cloud9-alpha
<!--END STABILITY BANNER-->
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a
browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular
programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your
development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your
office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing
serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of
serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair
program and track each other's inputs in real time.
## Creating EC2 Environment
EC2 Environments are defined with `Ec2Environment`. To create an EC2 environment in the private subnet, specify
`subnetSelection` with private `subnetType`.
```python
# create a cloud9 ec2 environment in a new VPC
vpc = ec2.Vpc(self, "VPC", max_azs=3)
cloud9.Ec2Environment(self, "Cloud9Env", vpc=vpc, image_id=cloud9.ImageId.AMAZON_LINUX_2)
# or create the cloud9 environment in the default VPC with specific instanceType
default_vpc = ec2.Vpc.from_lookup(self, "DefaultVPC", is_default=True)
cloud9.Ec2Environment(self, "Cloud9Env2",
vpc=default_vpc,
instance_type=ec2.InstanceType("t3.large"),
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
# or specify in a different subnetSelection
c9env = cloud9.Ec2Environment(self, "Cloud9Env3",
vpc=vpc,
subnet_selection=ec2.SubnetSelection(
subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS
),
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
# print the Cloud9 IDE URL in the output
CfnOutput(self, "URL", value=c9env.ide_url)
```
## Specifying EC2 AMI
Use `imageId` to specify the EC2 AMI image to be used:
```python
default_vpc = ec2.Vpc.from_lookup(self, "DefaultVPC", is_default=True)
cloud9.Ec2Environment(self, "Cloud9Env2",
vpc=default_vpc,
instance_type=ec2.InstanceType("t3.large"),
image_id=cloud9.ImageId.UBUNTU_18_04
)
```
## Cloning Repositories
Use `clonedRepositories` to clone one or multiple AWS Codecommit repositories into the environment:
```python
import aws_cdk.aws_codecommit as codecommit
# create a new Cloud9 environment and clone the two repositories
# vpc: ec2.Vpc
# create a codecommit repository to clone into the cloud9 environment
repo_new = codecommit.Repository(self, "RepoNew",
repository_name="new-repo"
)
# import an existing codecommit repository to clone into the cloud9 environment
repo_existing = codecommit.Repository.from_repository_name(self, "RepoExisting", "existing-repo")
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
cloned_repositories=[
cloud9.CloneRepository.from_code_commit(repo_new, "/src/new-repo"),
cloud9.CloneRepository.from_code_commit(repo_existing, "/src/existing-repo")
],
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
```
## Specifying Owners
Every Cloud9 Environment has an **owner**. An owner has full control over the environment, and can invite additional members to the environment for collaboration purposes. For more information, see [Working with shared environments in AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html)).
By default, the owner will be the identity that creates the Environment, which is most likely your CloudFormation Execution Role when the Environment is created using CloudFormation. Provider a value for the `owner` property to assign a different owner, either a specific IAM User or the AWS Account Root User.
`Owner` is a user that owns a Cloud9 environment . `Owner` has their own access permissions, resources. And we can specify an `Owner`in an Ec2 environment which could be of two types, 1. AccountRoot and 2. Iam User. It allows AWS to determine who has permissions to manage the environment, either an IAM user or the account root user (but using the account root user is not recommended, see [environment sharing best practices](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html#share-environment-best-practices)).
To specify the AWS Account Root User as the environment owner, use `Owner.accountRoot()`
```python
# vpc: ec2.Vpc
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
image_id=cloud9.ImageId.AMAZON_LINUX_2,
owner=cloud9.Owner.account_root("111111111")
)
```
To specify a specific IAM User as the environment owner, use `Owner.user()`. The user should have the `AWSCloud9Administrator` managed policy
```python
import aws_cdk.aws_iam as iam
# vpc: ec2.Vpc
user = iam.User(self, "user")
user.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name("AWSCloud9Administrator"))
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
image_id=cloud9.ImageId.AMAZON_LINUX_2,
owner=cloud9.Owner.user(user)
)
```
%package help
Summary: Development documents and examples for aws-cdk.aws-cloud9-alpha
Provides: python3-aws-cdk.aws-cloud9-alpha-doc
%description help
<!--END STABILITY BANNER-->
This module is part of the [AWS Cloud Development Kit](https://github.com/aws/aws-cdk) project.
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a
browser. It includes a code editor, debugger, and terminal. Cloud9 comes prepackaged with essential tools for popular
programming languages, including JavaScript, Python, PHP, and more, so you don’t need to install files or configure your
development machine to start new projects. Since your Cloud9 IDE is cloud-based, you can work on your projects from your
office, home, or anywhere using an internet-connected machine. Cloud9 also provides a seamless experience for developing
serverless applications enabling you to easily define resources, debug, and switch between local and remote execution of
serverless applications. With Cloud9, you can quickly share your development environment with your team, enabling you to pair
program and track each other's inputs in real time.
## Creating EC2 Environment
EC2 Environments are defined with `Ec2Environment`. To create an EC2 environment in the private subnet, specify
`subnetSelection` with private `subnetType`.
```python
# create a cloud9 ec2 environment in a new VPC
vpc = ec2.Vpc(self, "VPC", max_azs=3)
cloud9.Ec2Environment(self, "Cloud9Env", vpc=vpc, image_id=cloud9.ImageId.AMAZON_LINUX_2)
# or create the cloud9 environment in the default VPC with specific instanceType
default_vpc = ec2.Vpc.from_lookup(self, "DefaultVPC", is_default=True)
cloud9.Ec2Environment(self, "Cloud9Env2",
vpc=default_vpc,
instance_type=ec2.InstanceType("t3.large"),
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
# or specify in a different subnetSelection
c9env = cloud9.Ec2Environment(self, "Cloud9Env3",
vpc=vpc,
subnet_selection=ec2.SubnetSelection(
subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS
),
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
# print the Cloud9 IDE URL in the output
CfnOutput(self, "URL", value=c9env.ide_url)
```
## Specifying EC2 AMI
Use `imageId` to specify the EC2 AMI image to be used:
```python
default_vpc = ec2.Vpc.from_lookup(self, "DefaultVPC", is_default=True)
cloud9.Ec2Environment(self, "Cloud9Env2",
vpc=default_vpc,
instance_type=ec2.InstanceType("t3.large"),
image_id=cloud9.ImageId.UBUNTU_18_04
)
```
## Cloning Repositories
Use `clonedRepositories` to clone one or multiple AWS Codecommit repositories into the environment:
```python
import aws_cdk.aws_codecommit as codecommit
# create a new Cloud9 environment and clone the two repositories
# vpc: ec2.Vpc
# create a codecommit repository to clone into the cloud9 environment
repo_new = codecommit.Repository(self, "RepoNew",
repository_name="new-repo"
)
# import an existing codecommit repository to clone into the cloud9 environment
repo_existing = codecommit.Repository.from_repository_name(self, "RepoExisting", "existing-repo")
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
cloned_repositories=[
cloud9.CloneRepository.from_code_commit(repo_new, "/src/new-repo"),
cloud9.CloneRepository.from_code_commit(repo_existing, "/src/existing-repo")
],
image_id=cloud9.ImageId.AMAZON_LINUX_2
)
```
## Specifying Owners
Every Cloud9 Environment has an **owner**. An owner has full control over the environment, and can invite additional members to the environment for collaboration purposes. For more information, see [Working with shared environments in AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html)).
By default, the owner will be the identity that creates the Environment, which is most likely your CloudFormation Execution Role when the Environment is created using CloudFormation. Provider a value for the `owner` property to assign a different owner, either a specific IAM User or the AWS Account Root User.
`Owner` is a user that owns a Cloud9 environment . `Owner` has their own access permissions, resources. And we can specify an `Owner`in an Ec2 environment which could be of two types, 1. AccountRoot and 2. Iam User. It allows AWS to determine who has permissions to manage the environment, either an IAM user or the account root user (but using the account root user is not recommended, see [environment sharing best practices](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html#share-environment-best-practices)).
To specify the AWS Account Root User as the environment owner, use `Owner.accountRoot()`
```python
# vpc: ec2.Vpc
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
image_id=cloud9.ImageId.AMAZON_LINUX_2,
owner=cloud9.Owner.account_root("111111111")
)
```
To specify a specific IAM User as the environment owner, use `Owner.user()`. The user should have the `AWSCloud9Administrator` managed policy
```python
import aws_cdk.aws_iam as iam
# vpc: ec2.Vpc
user = iam.User(self, "user")
user.add_managed_policy(iam.ManagedPolicy.from_aws_managed_policy_name("AWSCloud9Administrator"))
cloud9.Ec2Environment(self, "C9Env",
vpc=vpc,
image_id=cloud9.ImageId.AMAZON_LINUX_2,
owner=cloud9.Owner.user(user)
)
```
%prep
%autosetup -n aws-cdk.aws-cloud9-alpha-2.81.0a0
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-aws-cdk.aws-cloud9-alpha -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 2.81.0a0-1
- Package Spec generated
|