File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed
codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -39,16 +39,16 @@ using your favorite package manager:
3939
4040The AWS SDK is modulized by clients and commands.
4141To send a request, you only need to import the ` SNSClient ` and
42- the commands you need, for example ` PublishCommand ` :
42+ the commands you need, for example ` AddPermissionCommand ` :
4343
4444``` js
4545// ES5 example
46- const { SNSClient , PublishCommand } = require (" @aws-sdk/client-sns" );
46+ const { SNSClient , AddPermissionCommand } = require (" @aws-sdk/client-sns" );
4747```
4848
4949``` ts
5050// ES6+ example
51- import { SNSClient , PublishCommand } from " @aws-sdk/client-sns" ;
51+ import { SNSClient , AddPermissionCommand } from " @aws-sdk/client-sns" ;
5252```
5353
5454### Usage
@@ -62,18 +62,12 @@ To send a request, you:
6262
6363``` js
6464// a client can be shared by different commands.
65- const client = new SNSClient ({ region: " <YOUR_REGION>" });
66-
67- const message = {
68- hello" :" world"
69- }
65+ const client = new SNSClient ({ region: " REGION" });
7066
7167const params = {
72- Message: JSON.stringify(message),
73- TopicArn: 'arn:aws:sns:<YOUR_REGION>:<YOUR_ACCOUNT_ID>:<YOUR_TOPIC_NAME>'
68+ /** input parameters */
7469};
75-
76- const command = new PublishCommand(params);
70+ const command = new AddPermissionCommand (params);
7771```
7872
7973#### Async/await
Original file line number Diff line number Diff line change 60176017 "emr-serverless": {
60186018 "endpoints": {
60196019 "ap-northeast-1": {},
6020+ "ap-northeast-2": {},
6021+ "ap-south-1": {},
60206022 "ap-southeast-1": {},
60216023 "eu-central-1": {},
60226024 "eu-west-1": {},
60416043 "deprecated": true,
60426044 "hostname": "emr-serverless-fips.us-west-2.amazonaws.com"
60436045 },
6046+ "sa-east-1": {},
60446047 "us-east-1": {
60456048 "variants": [
60466049 {
81878190 },
81888191 "ivschat": {
81898192 "endpoints": {
8193+ "ap-northeast-1": {},
8194+ "ap-northeast-2": {},
8195+ "ap-south-1": {},
8196+ "eu-central-1": {},
81908197 "eu-west-1": {},
81918198 "us-east-1": {},
81928199 "us-west-2": {}
You can’t perform that action at this time.
0 commit comments