Skip to content

Commit

Permalink
Add transcribe streaming yaml entry (awsdocs#3849)
Browse files Browse the repository at this point in the history
* Added example to yaml.
Minor Cmake change

* Added changes for text review from previous PR

* added create user to yaml

* Added SOS data for iam code

* update the yaml

* added list account aliases

Co-authored-by: Irene Smith <[email protected]>
  • Loading branch information
meyertst-aws and irenepsmith authored Oct 20, 2022
1 parent af479f9 commit 385f276
Show file tree
Hide file tree
Showing 23 changed files with 219 additions and 29 deletions.
155 changes: 155 additions & 0 deletions .doc_gen/metadata/iam_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ iam_DeleteAccountAlias:
- description:
snippet_tags:
- iam.JavaScript.alias.deleteAccountAlias
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.delete_account_alias.code
services:
iam: {DeleteAccountAlias}
iam_ListAccountAliases:
Expand Down Expand Up @@ -182,6 +190,14 @@ iam_ListAccountAliases:
- description:
snippet_tags:
- iam.JavaScript.alias.listAccountAliases
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.list_account_aliases.code
services:
iam: {ListAccountAliases}
iam_GetAccountAuthorizationDetails:
Expand Down Expand Up @@ -607,6 +623,14 @@ iam_DeleteAccessKey:
- description:
snippet_tags:
- rust.example_code.iam.service.delete_access_key
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.delete_access_key.code
services:
iam: {DeleteAccessKey}
iam_DeleteRolePolicy:
Expand Down Expand Up @@ -746,6 +770,14 @@ iam_ListAccessKeys:
- description:
snippet_tags:
- ruby.example_code.iam.DeleteUser
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.list_access_keys.code
services:
iam: {ListAccessKeys}
iam_UpdateAccessKey:
Expand Down Expand Up @@ -798,6 +830,14 @@ iam_UpdateAccessKey:
- description:
snippet_tags:
- iam.JavaScript.keys.updateAccessKey
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.update_access_key.code
services:
iam: {UpdateAccessKey}
iam_Scenario_ManageAccessKeys:
Expand Down Expand Up @@ -995,6 +1035,14 @@ iam_DeletePolicy:
- description:
snippet_tags:
- rust.example_code.iam.service.delete_policy
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.delete_policy.code
services:
iam: {DeletePolicy}
iam_CreatePolicyVersion:
Expand Down Expand Up @@ -1082,6 +1130,14 @@ iam_ListPolicies:
- description:
snippet_tags:
- rust.example_code.iam.service.list_policies
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.list_policies.code
services:
iam: {ListPolicies}
iam_GetPolicy:
Expand Down Expand Up @@ -1158,6 +1214,14 @@ iam_GetPolicy:
- description:
snippet_tags:
- ruby.example_code.iam.GetPolicy
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.get_policy.code
services:
iam: {GetPolicy}
iam_GetPolicyVersion:
Expand Down Expand Up @@ -1457,6 +1521,15 @@ iam_DetachRolePolicy:
- description:
snippet_tags:
- iam.JavaScript.policies.detachRolePolicy
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.detach_role_policy01.code
- iam.cpp.detach_role_policy02.code
services:
iam: {DetachRolePolicy}
iam_Scenario_PolicyManagement:
Expand Down Expand Up @@ -1762,6 +1835,22 @@ iam_DeleteRole:
- rust.example_code.iam.service.delete_role
services:
iam: {DeleteRole}
iam_PutRolePolicy:
title: Attach an inline policy to an &IAM; role using an &AWS; SDK
title_abbrev: Attach an inline policy to a role
synopsis: attach an inline policy to an &IAM; role.
category:
languages:
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.put_role_policy.code
services:
iam: {PutRolePolicy}
iam_ListRolePolicies:
title: List inline policies for an &IAM; role using an &AWS; SDK
title_abbrev: List inline policies for a role
Expand Down Expand Up @@ -1947,6 +2036,15 @@ iam_CreateUser:
- description:
snippet_tags:
- iam.JavaScript.users.getUser
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.create_user01.code
- iam.cpp.create_user02.code
services:
iam: {CreateUser}
iam_DeleteUser:
Expand Down Expand Up @@ -2034,6 +2132,15 @@ iam_DeleteUser:
- description:
snippet_tags:
- iam.JavaScript.users.deleteUser
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.delete_user01.code
- iam.cpp.delete_user02.code
services:
iam: {DeleteUser}
iam_ListUsers:
Expand Down Expand Up @@ -2130,6 +2237,14 @@ iam_ListUsers:
- description:
snippet_tags:
- iam.JavaScript.users.listUsers
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.list_users.code
services:
iam: {ListUsers}
iam_UpdateUser:
Expand Down Expand Up @@ -2191,6 +2306,14 @@ iam_UpdateUser:
- description:
snippet_tags:
- iam.JavaScript.users.updateUser
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.update_user.code
services:
iam: {UpdateUser}
iam_AttachUserPolicy:
Expand Down Expand Up @@ -2368,6 +2491,14 @@ iam_ListServerCertificates:
- description:
snippet_tags:
- iam.JavaScript.certs.listServerCertificates
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.list_server_certs.code
services:
iam: {ListServerCertificates}
iam_GetServerCertificate:
Expand Down Expand Up @@ -2395,6 +2526,14 @@ iam_GetServerCertificate:
- description:
snippet_tags:
- iam.JavaScript.certs.getServerCertificate
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.get_server_cert.code
services:
iam: {GetServerCertificate}
iam_UpdateServerCertificate:
Expand Down Expand Up @@ -2422,6 +2561,14 @@ iam_UpdateServerCertificate:
- description:
snippet_tags:
- iam.JavaScript.certs.updateServerCertificate
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.update_server_cert.code
services:
iam: {UpdateServerCertificate}
iam_DeleteServerCertificate:
Expand Down Expand Up @@ -2449,6 +2596,14 @@ iam_DeleteServerCertificate:
- description:
snippet_tags:
- iam.JavaScript.certs.deleteServerCertificate
C++:
versions:
- sdk_version: 1
github: cpp/example_code/iam
excerpts:
- description:
snippet_tags:
- iam.cpp.delete_server_cert.code
services:
iam: {DeleteServerCertificate}
iam_ListGroups:
Expand Down
16 changes: 16 additions & 0 deletions .doc_gen/metadata/transcribe_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,22 @@ transcribe_DeleteVocabulary:
- python.example_code.transcribe.DeleteVocabulary
services:
transcribe: {DeleteVocabulary}
transcribe_StartStreamTranscriptionAsync:
title: Produce real-time transcriptions with &TSC; using an &AWS; SDK
title_abbrev: Produce real-time transcriptions
synopsis: produce a real-time transcription with &TSC;.
category:
languages:
C++:
versions:
- sdk_version: 1
github: cpp/example_code/transcribe
excerpts:
- description:
snippet_tags:
- transcribe.cpp.stream_transcription_async.code
services:
transcribe: {StartStreamTranscriptionAsync}
transcribe_Scenario_GettingStartedTranscriptionJobs:
title: Transcribe audio and get job data with &TSC; using an &AWS; SDK
title_abbrev: Transcribe audio and get job data
Expand Down
12 changes: 9 additions & 3 deletions cpp/example_code/iam/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# AWS IAM code examples for the SDK for C++

## Overview
The code examples in this directory demonstrate how to work with the AWS Identity and Access Management (IAM) using the AWS SDK for C++.

The code examples in this directory demonstrate how to work with AWS Identity and Access Management (IAM) using the AWS SDK for C++.

*IAM is a web service that helps you securely control access to AWS resources. You use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources.*

## ⚠️ Important

* Running this code might result in charges to your AWS account.
* 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).
Expand All @@ -14,6 +16,7 @@ The code examples in this directory demonstrate how to work with the AWS Identit
## Code examples

### Single actions

- [Access the last used key](./access_key_last_used.cpp) (GetAccessKeyLastUsed)
- [Attach a role policy](./attach_role_policy.cpp) (AttachRolePolicy)
- [Create an access key](./create_access_key.cpp) (CreateAccessKey)
Expand All @@ -39,27 +42,30 @@ The code examples in this directory demonstrate how to work with the AWS Identit
- [Update a server certificate](./update_server_certificate.cpp) (UpdateServerCertificate)
- [Update a user](./update_user.cpp) (UpdateUser)


### Scenarios

- [Create an IAM user, create an IAM role, and apply the role to the user](./iam_create_user_assume_role_scenario.cpp) (CreateUser, GetUser, CreateRole, CreatePolicy, AssumeRole, ListBuckets, AttachRolePolicy, DetachRolePolicy, DeletePolicy, DeleteRole, DeleteUser)

## Run the examples

Before using the code examples, first complete the installation and setup steps of [Getting started](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) in the AWS SDK for C++ Developer Guide.
The Getting started section covers how to get and build the SDK, and how to build your own code by using the SDK with a sample “Hello World”-style application.

For information on the structure of the code examples and how to build and run the examples, see [Getting started with the AWS SDK for C++ code examples](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started-code-examples.html).

## Tests

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

```sh
cd <BUILD_DIR>
cmake <path-to-root-of-this-source-code> -DBUILD_TESTS=ON
make
ctest
```
```

## Additional resources

- [AWS Identity and Access Management (IAM) documentation](https://aws.amazon.com/iam/index.html)
- [AWS SDK for C++ documentation](https://docs.aws.amazon.com/sdk-for-cpp/index.html)
- [IAM code examples using the AWS SDK for C++](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/examples-iam.html)
Expand Down
2 changes: 1 addition & 1 deletion cpp/example_code/iam/create_role.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int main(int argc, char **argv) {
{
Aws::String roleName = argv[1];

// Define a role trust policy
// Define a role trust policy.
Aws::String roleTrustPolicy = R"({
"Version": "2012-10-17",
"Statement": {
Expand Down
4 changes: 2 additions & 2 deletions cpp/example_code/iam/delete_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* Purpose
*
* Demonstrates deleting an IAM policy.
* This api only works for policies that have not been associated with other resources.
* This API only works for policies that have not been associated with other resources.
* To delete a policy in the non-trivial case, use the DeletePolicy operation within the
* aws-cpp-sdk-access-management high level sdk.
* aws-cpp-sdk-access-management high-level SDK.
*
*/

Expand Down
4 changes: 2 additions & 2 deletions cpp/example_code/iam/delete_user.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* Purpose
*
* Demonstrates deleting an IAM user.
* This api only works for users with noassociated resources, for example groups and policies.
* This API only works for users with no associated resources, such as groups and policies.
* To delete a user in the non-trivial case, use the DeleteUser operation within the
* aws-cpp-sdk-access-management high level sdk.
* aws-cpp-sdk-access-management high-level SDK.
*
*/

Expand Down
Loading

0 comments on commit 385f276

Please sign in to comment.