Skip to content

Commit

Permalink
Ran writemes on all lang:ver:service pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSouther committed Sep 12, 2023
1 parent 23e86e7 commit ad8b207
Show file tree
Hide file tree
Showing 303 changed files with 12,215 additions and 4,647 deletions.
37 changes: 37 additions & 0 deletions .doc_gen/readmes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,43 @@
'base_folder': 'dotnetv3',
'service_folder': 'dotnetv3/{{service["name"] | capitalize}}',
'sdk_api_ref': 'https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/{{service["name"] | capitalize}}/N{{service["name"] | capitalize}}.html',
'service_folder_overrides': {
'acm': 'dotnetv3/ACM',
'aurora': 'dotnetv3/Aurora',
'auto-scaling': 'dotnetv3/AutoScaling',
'cloudwatch': 'dotnetv3/CloudWatch',
'cloudwatch-logs': 'dotnetv3/CloudWatchLogs',
'cognito': 'dotnetv3/Cognito',
'comprehend': 'dotnetv3/Comprehend',
'dynamodb': 'dotnetv3/dynamodb',
'ec2': 'dotnetv3/EC2',
'ecs': 'dotnetv3/ECS',
'eventbridge': 'dotnetv3/EventBridge',
'glacier': 'dotnetv3/Glacier',
'glue': 'dotnetv3/Glue',
'iam': 'dotnetv3/IAM',
'keyspaces': 'dotnetv3/Keyspaces',
'kinesis': 'dotnetv3/Kinesis',
'kms': 'dotnetv3/KMS',
'lambda': 'dotnetv3/Lambda',
'mediaconvert': 'dotnetv3/MediaConvert',
'organizations': 'dotnetv3/Organizations',
'polly': 'dotnetv3/Polly',
'rds': 'dotnetv3/RDS',
'rekognition': 'dotnetv3/Rekognition',
'route-53': 'dotnetv3/Route53',
's3': 'dotnetv3/S3',
'sagemaker': 'dotnetv3/SageMaker',
'secrets-manager': 'dotnetv3/SecretsManager',
'ses': 'dotnetv3/SES',
'sns': 'dotnetv3/SNS',
'sqs': 'dotnetv3/SQS',
'step-functions': 'dotnetv3/StepFunctions',
'sts': 'dotnetv3/STS',
'support': 'dotnetv3/Support',
'transcribe': 'dotnetv3/Transcribe',
'translate': 'dotnetv3/Translate',
}
}
},
'PHP': {
Expand Down
2 changes: 1 addition & 1 deletion .doc_gen/readmes/includes/important.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## ⚠ Important

* Running this code might result in charges to your AWS account.
* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details.
* Running the tests might result in charges to your AWS account.
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege).
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).
Expand Down
2 changes: 1 addition & 1 deletion .doc_gen/readmes/includes/macros.jinja2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% macro list_examples(examples) %}
{% for ex in examples %}
* [{{ ex['title_abbrev']}}]({{ex['file']}}) {% if ex['api'] %}(`{{ex['api']}}`){% endif %}
* [{{ ex['title_abbrev']}}]({{ex['file']}}){% if ex['api'] %} (`{{ex['api']}}`){% endif %}

{% endfor %}
{% endmacro %}
10 changes: 8 additions & 2 deletions .doc_gen/readmes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def main():
if args.dry_run:
logging.info("Dry run, no changes will be made.")

skipped = []

for language_and_version in args.languages:
(language, version) = language_and_version.split(":")
if int(version) not in sdks[language]["sdk"]:
Expand All @@ -76,10 +78,14 @@ def main():
if not args.dry_run:
Renderer(scanner, int(version), args.safe).render()
except Exception as err:
skip = f"{language}:{version}:{service}"
logging.error(
f"Exception rendering {language}:{version}:{service} - {err}",
f"Exception rendering {skip} - {err}",
)
raise err
skipped.append(skip)

skip_list = "\n\t".join(skipped)
logging.info(f"Run complete. Skipped: {skip_list}")


if __name__ == "__main__":
Expand Down
4 changes: 3 additions & 1 deletion .doc_gen/readmes/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def __init__(self, scanner, sdk_ver, safe, svc_folder=None):
if svc_folder is not None:
self.lang_config['service_folder'] = svc_folder
else:
if 'service_folder' in self.lang_config:
if "service_folder_overrides" in self.lang_config and scanner.svc_name in self.lang_config["service_folder_overrides"]:
self.lang_config["service_folder"] = self.lang_config["service_folder_overrides"][scanner.svc_name]
elif 'service_folder' in self.lang_config:
svc_folder_tmpl = env.from_string(self.lang_config['service_folder'])
self.lang_config['service_folder'] = svc_folder_tmpl.render(service=service_info)
else:
Expand Down
5 changes: 5 additions & 0 deletions .doc_gen/readmes/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ def _load_cross(self):
def _load_examples(self):
self.example_meta = self._load_meta(f'{self.svc_name}_metadata.yaml', self.example_meta)

def set_example(self, language, service):
self.lang_name = language
self.svc_name = service
self.example_meta = None

def sdk(self):
self._load_sdks()
return self.sdk_meta[self.lang_name]
Expand Down
69 changes: 69 additions & 0 deletions aws-cli/bash-linux/ec2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!--Generated by WRITEME on 2023-09-12 00:35:31.718635 (UTC)-->
# Amazon EC2 code examples for the Command Line Interface with Bash script

## Overview

Shows how to use the AWS Command Line Interface with Bash script to work with Amazon Elastic Compute Cloud (Amazon EC2).

<!--custom.overview.start-->
<!--custom.overview.end-->

*Amazon EC2 is a web service that provides resizable computing capacity—literally, servers in Amazon's data centers—that you use to build and host your software systems.*

## ⚠ Important

* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details.
* Running the tests might result in charges to your AWS account.
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege).
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).

<!--custom.important.start-->
<!--custom.important.end-->

## Code examples

### Prerequisites

For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-cli` folder.


<!--custom.prerequisites.start-->
<!--custom.prerequisites.end-->

## Run the examples

### Instructions


<!--custom.instructions.start-->
<!--custom.instructions.end-->



### Tests

⚠ Running tests might result in charges to your AWS account.


To find instructions for running these tests, see the [README](../../README.md#Tests)
in the `aws-cli` folder.



<!--custom.tests.start-->
<!--custom.tests.end-->

## Additional resources

* [Amazon EC2 User Guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html)
* [Amazon EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html)
* [Command Line Interface with Bash script Amazon EC2 reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/index.html)

<!--custom.resources.start-->
<!--custom.resources.end-->

---

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

SPDX-License-Identifier: Apache-2.0
32 changes: 16 additions & 16 deletions aws-cli/bash-linux/iam/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--Generated by WRITEME on 2023-08-04 12:54:07.388627 (UTC)-->
# IAM code examples for the Command Line Interface with Bash
<!--Generated by WRITEME on 2023-09-12 00:35:32.083602 (UTC)-->
# IAM code examples for the Command Line Interface with Bash script

## Overview

Shows how to use the AWS Command Line Interface with Bash to work with AWS Identity and Access Management (IAM).
Shows how to use the AWS Command Line Interface with Bash script to work with AWS Identity and Access Management (IAM).

<!--custom.overview.start-->
<!--custom.overview.end-->
Expand All @@ -12,7 +12,7 @@ Shows how to use the AWS Command Line Interface with Bash to work with AWS Ident

## ⚠ Important

* Running this code might result in charges to your AWS account.
* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details.
* Running the tests might result in charges to your AWS account.
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege).
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).
Expand All @@ -34,26 +34,26 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-c

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

* [Attach a policy to a role](iam_operations.sh#L505) (`AttachRolePolicy`)
* [Create a policy](iam_operations.sh#L430) (`CreatePolicy`)
* [Create a role](iam_operations.sh#L351) (`CreateRole`)
* [Create a user](iam_operations.sh#L122) (`CreateUser`)
* [Create an access key](iam_operations.sh#L201) (`CreateAccessKey`)
* [Delete a policy](iam_operations.sh#L655) (`DeletePolicy`)
* [Delete a role](iam_operations.sh#L725) (`DeleteRole`)
* [Delete a user](iam_operations.sh#L877) (`DeleteUser`)
* [Delete an access key](iam_operations.sh#L796) (`DeleteAccessKey`)
* [Detach a policy from a role](iam_operations.sh#L580) (`DetachRolePolicy`)
* [Attach a policy to a role](iam_operations.sh#L501) (`AttachRolePolicy`)
* [Create a policy](iam_operations.sh#L426) (`CreatePolicy`)
* [Create a role](iam_operations.sh#L347) (`CreateRole`)
* [Create a user](iam_operations.sh#L118) (`CreateUser`)
* [Create an access key](iam_operations.sh#L197) (`CreateAccessKey`)
* [Delete a policy](iam_operations.sh#L651) (`DeletePolicy`)
* [Delete a role](iam_operations.sh#L721) (`DeleteRole`)
* [Delete a user](iam_operations.sh#L873) (`DeleteUser`)
* [Delete an access key](iam_operations.sh#L792) (`DeleteAccessKey`)
* [Detach a policy from a role](iam_operations.sh#L576) (`DetachRolePolicy`)
* [Get a user](iam_operations.sh#L22) (`GetUser`)
* [List a user's access keys](iam_operations.sh#L282) (`ListAccessKeys`)
* [List a user's access keys](iam_operations.sh#L278) (`ListAccessKeys`)
* [List users](iam_operations.sh#L61) (`ListUsers`)

### Scenarios

Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.

* [Create a user and assume a role](iam_create_user_assume_role_scenario.sh)
* [Create a user and assume a role](iam_operations.sh)

## Run the examples

Expand Down
8 changes: 4 additions & 4 deletions aws-cli/bash-linux/medical-imaging/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--Generated by WRITEME on 2023-08-11 15:51:03.699447 (UTC)-->
<!--Generated by WRITEME on 2023-09-12 00:35:32.347722 (UTC)-->
# HealthImaging code examples for the Command Line Interface with Bash script

## Overview
Expand All @@ -12,7 +12,7 @@ Shows how to use the AWS Command Line Interface with Bash script to work with AW

## ⚠ Important

* Running this code might result in charges to your AWS account.
* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details.
* Running the tests might result in charges to your AWS account.
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege).
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).
Expand All @@ -35,8 +35,8 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-c
Code excerpts that show you how to call individual service functions.

* [Create a data store](medical_imaging_operations.sh#L22) (`CreateDatastore`)
* [Delete a data store](medical_imaging_operations.sh#L267) (`DeleteDatastore`)
* [Get data store properties](medical_imaging_operations.sh#L196) (`GetDatastore`)
* [Delete a data store](medical_imaging_operations.sh#L218) (`DeleteDatastore`)
* [Get data store properties](medical_imaging_operations.sh#L147) (`GetDatastore`)
* [List data stores](medical_imaging_operations.sh#L91) (`ListDatastores`)

## Run the examples
Expand Down
14 changes: 7 additions & 7 deletions aws-cli/bash-linux/s3/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!--Generated by WRITEME on 2023-05-23 12:20:43.024828 (UTC)-->
# Amazon S3 code examples for the Command Line Interface
<!--Generated by WRITEME on 2023-09-12 00:35:32.767367 (UTC)-->
# Amazon S3 code examples for the Command Line Interface with Bash script

## Overview

Shows how to use the AWS Command Line Interface to work with Amazon Simple Storage Service (Amazon S3).
Shows how to use the AWS Command Line Interface with Bash script to work with Amazon Simple Storage Service (Amazon S3).

<!--custom.overview.start-->
<!--custom.overview.end-->
Expand All @@ -12,7 +12,7 @@ Shows how to use the AWS Command Line Interface to work with Amazon Simple Stora

## ⚠ Important

* Running this code might result in charges to your AWS account.
* Running this code might result in charges to your AWS account. See [AWS Pricing](https://aws.amazon.com/pricing/?aws-products-pricing.sort-by=item.additionalFields.productNameLowercase&aws-products-pricing.sort-order=asc&awsf.Free%20Tier%20Type=*all&awsf.tech-category=*all) and [Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more details.
* Running the tests might result in charges to your AWS account.
* We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege).
* This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).
Expand Down Expand Up @@ -41,15 +41,15 @@ Code excerpts that show you how to call individual service functions.
* [Delete multiple objects](bucket-lifecycle-operations/bucket_operations.sh#L310) (`DeleteObjects`)
* [Determine the existence of a bucket](bucket-lifecycle-operations/bucket_operations.sh#L24) (`HeadBucket`)
* [Get an object from a bucket](bucket-lifecycle-operations/bucket_operations.sh#L175) (`GetObject`)
* [List objects in a bucket](bucket-lifecycle-operations/bucket_operations.sh#L243) (`ListObjects`)
* [List objects in a bucket](bucket-lifecycle-operations/awsdocs_general.sh#L97) (`ListObjectsV2`)
* [Upload an object to a bucket](bucket-lifecycle-operations/bucket_operations.sh#L141) (`PutObject`)

### Scenarios

Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.

* [Get started with buckets and objects](s3_getting_started.sh)
* [Get started with buckets and objects](bucket-lifecycle-operations/bucket_operations.sh)

## Run the examples

Expand Down Expand Up @@ -95,7 +95,7 @@ in the `aws-cli` folder.

* [Amazon S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html)
* [Amazon S3 API Reference](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html)
* [Command Line Interface Amazon S3 reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/index.html)
* [Command Line Interface with Bash script Amazon S3 reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/index.html)

<!--custom.resources.start-->
<!--custom.resources.end-->
Expand Down
Loading

0 comments on commit ad8b207

Please sign in to comment.