이 문서는 AWS CLI의 버전 1에만 해당합니다. AWS CLI의 버전 2와 관련된 문서는 버전 2 사용 설명서를 참조하세요.
다음 코드 예시는 Amazon Pinpoint와 함께 AWS Command Line Interface를 사용하여 작업을 수행하고 일반적인 시나리오를 구현하는 방법을 보여줍니다.
작업은 대규모 프로그램에서 발췌한 코드이며 컨텍스트에 맞춰 실행해야 합니다. 작업은 관련 시나리오의 컨텍스트에 따라 표시되며, 개별 서비스 함수를 직접적으로 호출하는 방법을 보여줍니다.
각 예시에는 전체 소스 코드에 대한 링크가 포함되어 있으며, 여기에서 컨텍스트에 맞춰 코드를 설정하고 실행하는 방법에 대한 지침을 찾을 수 있습니다.
주제
작업
다음 코드 예시에서는 create-app
의 사용 방법을 보여줍니다.
- AWS CLI
-
예시 1: 애플리케이션 생성
다음
create-app
예시에서는 새 애플리케이션(프로젝트)을 생성합니다.aws pinpoint create-app \ --create-application-request
Name=ExampleCorp
출력:
{ "ApplicationResponse": { "Arn": "arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example", "Id": "810c7aab86d42fb2b56c8c966example", "Name": "ExampleCorp", "tags": {} } }
예시 2: 태그가 지정된 애플리케이션을 생성하는 방법
다음
create-app
예시에서는 새 애플리케이션(프로젝트)을 만들고 태그(키 및 값)를 애플리케이션에 연결합니다.aws pinpoint create-app \ --create-application-request Name=ExampleCorp,tags={"Stack"="Test"}
출력:
{ "ApplicationResponse": { "Arn": "arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example", "Id": "810c7aab86d42fb2b56c8c966example", "Name": "ExampleCorp", "tags": { "Stack": "Test" } } }
-
API 세부 정보는 AWS CLI 명령 참조의 CreateApp
을 참조하세요.
-
다음 코드 예시에서는 create-sms-template
의 사용 방법을 보여줍니다.
- AWS CLI
-
SMS 채널을 통해 전송되는 메시지의 메시지 템플릿 생성
다음
create-sms-template
예시에서는 SMS 메시지 템플릿을 생성합니다.aws pinpoint create-sms-template \ --template-name
TestTemplate
\ --sms-template-requestfile://myfile.json
\ --regionus-east-1
myfile.json
의 콘텐츠:{ "Body": "hello\n how are you?\n food is good", "TemplateDescription": "Test SMS Template" }
출력:
{ "CreateTemplateMessageBody": { "Arn": "arn:aws:mobiletargeting:us-east-1:AIDACKCEVSQ6C2EXAMPLE:templates/TestTemplate/SMS", "Message": "Created", "RequestID": "8c36b17f-a0b0-400f-ac21-29e9b62a975d" } }
자세한 내용은 Amazon Pinpoint 사용자 안내서의 Amazon Pinpoint SMS 채널을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 CreateSmsTemplate
을 참조하세요.
-
다음 코드 예시에서는 delete-app
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션 삭제
다음
delete-app
예시에서는 애플리케이션(프로젝트)을 삭제합니다.aws pinpoint delete-app \ --application-id
810c7aab86d42fb2b56c8c966example
출력:
{ "ApplicationResponse": { "Arn": "arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example", "Id": "810c7aab86d42fb2b56c8c966example", "Name": "ExampleCorp", "tags": {} } }
-
API 세부 정보는 AWS CLI 명령 참조의 DeleteApp
을 참조하세요.
-
다음 코드 예시에서는 get-apns-channel
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션의 APN 채널 상태 및 설정 정보 가져오기
다음
get-apns-channel
예시에서는 애플리케이션의 APN 채널 상태 및 설정에 대한 정보를 가져옵니다.aws pinpoint get-apns-channel \ --application-id
9ab1068eb0a6461c86cce7f27ce0efd7
\ --regionus-east-1
출력:
{ "APNSChannelResponse": { "ApplicationId": "9ab1068eb0a6461c86cce7f27ce0efd7", "CreationDate": "2019-05-09T21:54:45.082Z", "DefaultAuthenticationMethod": "CERTIFICATE", "Enabled": true, "HasCredential": true, "HasTokenKey": false, "Id": "apns", "IsArchived": false, "LastModifiedDate": "2019-05-09T22:04:01.067Z", "Platform": "APNS", "Version": 2 } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetApnsChannel
을 참조하세요.
-
다음 코드 예시에서는 get-app
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션(프로젝트)의 정보 가져오기
다음
get-app
예시에서는 애플리케이션(프로젝트)의 정보를 가져옵니다.aws pinpoint get-app \ --application-id
810c7aab86d42fb2b56c8c966example
\ --regionus-east-1
출력:
{ "ApplicationResponse": { "Arn": "arn:aws:mobiletargeting:us-east-1:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example", "Id": "810c7aab86d42fb2b56c8c966example", "Name": "ExampleCorp", "tags": { "Year": "2019", "Stack": "Production" } } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetApp
을 참조하세요.
-
다음 코드 예시에서는 get-apps
의 사용 방법을 보여줍니다.
- AWS CLI
-
모든 애플리케이션의 정보 가져오기
다음
get-apps
예시에서는 모든 애플리케이션(프로젝트)의 정보를 가져옵니다.aws pinpoint get-apps
출력:
{ "ApplicationsResponse": { "Item": [ { "Arn": "arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example", "Id": "810c7aab86d42fb2b56c8c966example", "Name": "ExampleCorp", "tags": { "Year": "2019", "Stack": "Production" } }, { "Arn": "arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/42d8c7eb0990a57ba1d5476a3example", "Id": "42d8c7eb0990a57ba1d5476a3example", "Name": "AnyCompany", "tags": {} }, { "Arn": "arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/80f5c382b638ffe5ad12376bbexample", "Id": "80f5c382b638ffe5ad12376bbexample", "Name": "ExampleCorp_Test", "tags": { "Year": "2019", "Stack": "Test" } } ], "NextToken": "eyJDcmVhdGlvbkRhdGUiOiIyMDE5LTA3LTE2VDE0OjM4OjUzLjkwM1oiLCJBY2NvdW50SWQiOiI1MTIzOTcxODM4NzciLCJBcHBJZCI6Ijk1ZTM2MGRiMzBkMjQ1ZjRiYTYwYjhlMzllMzZlNjZhIn0" } }
NextToken
응답 값의 존재는 사용 가능한 출력이 더 많음을 나타냅니다. 명령을 다시 직접적으로 호출하고 해당 값을NextToken
입력 파라미터로 입력합니다.-
API 세부 정보는 AWS CLI 명령 참조의 GetApps
를 참조하세요.
-
다음 코드 예시에서는 get-campaign
의 사용 방법을 보여줍니다.
- AWS CLI
-
캠페인의 상태, 구성 및 기타 설정 정보 가져오기
다음
get-campaign
예시에서는 캠페인의 상태, 구성 및 기타 설정에 대한 정보를 가져옵니다.aws pinpoint get-campaign \ --application-id
6e0b7591a90841d2b5d93fa11143e5a7
\ --campaign-ida1e63c6cc0eb43ed826ffcc3cc90b30d
\ --regionus-east-1
출력:
{ "CampaignResponse": { "AdditionalTreatments": [], "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "Arn": "arn:aws:mobiletargeting:us-east-1:AIDACKCEVSQ6C2EXAMPLE:apps/6e0b7591a90841d2b5d93fa11143e5a7/campaigns/a1e63c6cc0eb43ed826ffcc3cc90b30d", "CreationDate": "2019-10-08T18:40:16.581Z", "Description": " ", "HoldoutPercent": 0, "Id": "a1e63c6cc0eb43ed826ffcc3cc90b30d", "IsPaused": false, "LastModifiedDate": "2019-10-08T18:40:16.581Z", "Limits": { "Daily": 0, "MaximumDuration": 60, "MessagesPerSecond": 50, "Total": 0 }, "MessageConfiguration": { "EmailMessage": { "FromAddress": "sender@example.com", "HtmlBody": "<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n</head>\n<body>Hello</body>\n</html>", "Title": "PinpointDemo" } }, "Name": "MyCampaign", "Schedule": { "IsLocalTime": false, "StartTime": "IMMEDIATE", "Timezone": "utc" }, "SegmentId": "b66c9e42f71444b2aa2e0ffc1df28f60", "SegmentVersion": 1, "State": { "CampaignStatus": "COMPLETED" }, "tags": {}, "TemplateConfiguration": {}, "Version": 1 } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetCampaign
을 참조하세요.
-
다음 코드 예시에서는 get-campaigns
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션에 연결된 모든 캠페인의 상태, 구성 및 기타 설정 정보 가져오기
다음
get-campaigns
예시에서는 애플리케이션에 연결된 모든 캠페인의 상태, 구성 및 기타 설정에 대한 정보를 가져옵니다.aws pinpoint get-campaigns \ --application-id
6e0b7591a90841d2b5d93fa11143e5a7
\ --regionus-east-1
출력:
{ "CampaignsResponse": { "Item": [ { "AdditionalTreatments": [], "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "Arn": "arn:aws:mobiletargeting:us-east-1:AIDACKCEVSQ6C2EXAMPLE:apps/6e0b7591a90841d2b5d93fa11143e5a7/campaigns/7e1280344c8f4a9aa40a00b006fe44f1", "CreationDate": "2019-10-08T18:40:22.905Z", "Description": " ", "HoldoutPercent": 0, "Id": "7e1280344c8f4a9aa40a00b006fe44f1", "IsPaused": false, "LastModifiedDate": "2019-10-08T18:40:22.905Z", "Limits": {}, "MessageConfiguration": { "EmailMessage": { "FromAddress": "sender@example.com", "HtmlBody": "<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n</head>\n<body>Hello</body>\n</html>", "Title": "PInpointDemo Test" } }, "Name": "MyCampaign1", "Schedule": { "IsLocalTime": false, "QuietTime": {}, "StartTime": "IMMEDIATE", "Timezone": "UTC" }, "SegmentId": "b66c9e42f71444b2aa2e0ffc1df28f60", "SegmentVersion": 1, "State": { "CampaignStatus": "COMPLETED" }, "tags": {}, "TemplateConfiguration": {}, "Version": 1 }, { "AdditionalTreatments": [], "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "Arn": "arn:aws:mobiletargeting:us-east-1:AIDACKCEVSQ6C2EXAMPLE:apps/6e0b7591a90841d2b5d93fa11143e5a7/campaigns/a1e63c6cc0eb43ed826ffcc3cc90b30d", "CreationDate": "2019-10-08T18:40:16.581Z", "Description": " ", "HoldoutPercent": 0, "Id": "a1e63c6cc0eb43ed826ffcc3cc90b30d", "IsPaused": false, "LastModifiedDate": "2019-10-08T18:40:16.581Z", "Limits": { "Daily": 0, "MaximumDuration": 60, "MessagesPerSecond": 50, "Total": 0 }, "MessageConfiguration": { "EmailMessage": { "FromAddress": "sender@example.com", "HtmlBody": "<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n</head>\n<body>Demo</body>\n</html>", "Title": "PinpointDemo" } }, "Name": "MyCampaign2", "Schedule": { "IsLocalTime": false, "StartTime": "IMMEDIATE", "Timezone": "utc" }, "SegmentId": "b66c9e42f71444b2aa2e0ffc1df28f60", "SegmentVersion": 1, "State": { "CampaignStatus": "COMPLETED" }, "tags": {}, "TemplateConfiguration": {}, "Version": 1 } ] } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetCampaigns
를 참조하세요.
-
다음 코드 예시에서는 get-channels
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션의 각 채널 기록 및 상태 정보 가져오기
다음
get-channels
예시에서는 애플리케이션의 각 채널 기록 및 상태에 대한 정보를 가져옵니다.aws pinpoint get-channels \ --application-id
6e0b7591a90841d2b5d93fa11143e5a7
\ --regionus-east-1
출력:
{ "ChannelsResponse": { "Channels": { "GCM": { "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "CreationDate": "2019-10-08T18:28:23.182Z", "Enabled": true, "HasCredential": true, "Id": "gcm", "IsArchived": false, "LastModifiedDate": "2019-10-08T18:28:23.182Z", "Version": 1 }, "SMS": { "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "CreationDate": "2019-10-08T18:39:18.511Z", "Enabled": true, "Id": "sms", "IsArchived": false, "LastModifiedDate": "2019-10-08T18:39:18.511Z", "Version": 1 }, "EMAIL": { "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "CreationDate": "2019-10-08T18:27:23.990Z", "Enabled": true, "Id": "email", "IsArchived": false, "LastModifiedDate": "2019-10-08T18:27:23.990Z", "Version": 1 }, "IN_APP": { "Enabled": true, "IsArchived": false, "Version": 0 } } } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetChannels
를 참조하세요.
-
다음 코드 예시에서는 get-email-channel
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션의 Email 채널 상태 및 설정 정보 가져오기
다음
get-email-channel
예시에서는 애플리케이션의 Email 채널 상태 및 설정을 가져옵니다.aws pinpoint get-email-channel \ --application-id
6e0b7591a90841d2b5d93fa11143e5a7
\ --regionus-east-1
출력:
{ "EmailChannelResponse": { "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "CreationDate": "2019-10-08T18:27:23.990Z", "Enabled": true, "FromAddress": "sender@example.com", "Id": "email", "Identity": "arn:aws:ses:us-east-1:AIDACKCEVSQ6C2EXAMPLE:identity/sender@example.com", "IsArchived": false, "LastModifiedDate": "2019-10-08T18:27:23.990Z", "MessagesPerSecond": 1, "Platform": "EMAIL", "RoleArn": "arn:aws:iam::AIDACKCEVSQ6C2EXAMPLE:role/pinpoint-events", "Version": 1 } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetEmailChannel
을 참조합니다.
-
다음 코드 예시에서는 get-endpoint
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션의 특정 엔드포인트 설정 및 속성 정보 가져오기
다음
get-endpoint
예시에서는 애플리케이션의 특정 엔드포인트 설정 및 속성에 대한 정보를 가져옵니다.aws pinpoint get-endpoint \ --application-id
611e3e3cdd47474c9c1399a505665b91
\ --endpoint-idtestendpoint
\ --regionus-east-1
출력:
{ "EndpointResponse": { "Address": "+11234567890", "ApplicationId": "611e3e3cdd47474c9c1399a505665b91", "Attributes": {}, "ChannelType": "SMS", "CohortId": "63", "CreationDate": "2019-01-28T23:55:11.534Z", "EffectiveDate": "2021-08-06T00:04:51.763Z", "EndpointStatus": "ACTIVE", "Id": "testendpoint", "Location": { "Country": "USA" }, "Metrics": { "SmsDelivered": 1.0 }, "OptOut": "ALL", "RequestId": "a204b1f2-7e26-48a7-9c80-b49a2143489d", "User": { "UserAttributes": { "Age": [ "24" ] }, "UserId": "testuser" } } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetEndpoint
를 참조하세요.
-
다음 코드 예시에서는 get-gcm-channel
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션의 GCM 채널 상태 및 설정 정보 가져오기
다음
get-gcm-channel
예시에서는 애플리케이션의 GCM 채널 상태 및 설정에 대한 정보를 가져옵니다.aws pinpoint get-gcm-channel \ --application-id
6e0b7591a90841d2b5d93fa11143e5a7
\ --regionus-east-1
출력:
{ "GCMChannelResponse": { "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "CreationDate": "2019-10-08T18:28:23.182Z", "Enabled": true, "HasCredential": true, "Id": "gcm", "IsArchived": false, "LastModifiedDate": "2019-10-08T18:28:23.182Z", "Platform": "GCM", "Version": 1 } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetGcmChannel
을 참조하세요.
-
다음 코드 예시에서는 get-sms-channel
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션의 SMS 채널 상태 및 설정 정보 가져오기
다음
get-sms-channel
예시에서는 애플리케이션의 SMS 채널 상태 및 설정을 가져옵니다.aws pinpoint get-sms-channel \ --application-id
6e0b7591a90841d2b5d93fa11143e5a7
\ --regionus-east-1
출력:
{ "SMSChannelResponse": { "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "CreationDate": "2019-10-08T18:39:18.511Z", "Enabled": true, "Id": "sms", "IsArchived": false, "LastModifiedDate": "2019-10-08T18:39:18.511Z", "Platform": "SMS", "PromotionalMessagesPerSecond": 20, "TransactionalMessagesPerSecond": 20, "Version": 1 } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetSmsChannel
을 참조하세요.
-
다음 코드 예시에서는 get-sms-template
의 사용 방법을 보여줍니다.
- AWS CLI
-
SMS 채널을 통해 전송되는 메시지에 대한 메시지 템플릿의 콘텐츠 및 설정 가져오기
다음
get-sms-template
예시에서는 SMS 메시지 템플릿의 콘텐츠와 설정을 가져옵니다.aws pinpoint get-sms-template \ --template-name
TestTemplate
\ --regionus-east-1
출력:
{ "SMSTemplateResponse": { "Arn": "arn:aws:mobiletargeting:us-east-1:AIDACKCEVSQ6C2EXAMPLE:templates/TestTemplate/SMS", "Body": "hello\n how are you?\n food is good", "CreationDate": "2023-06-20T21:37:30.124Z", "LastModifiedDate": "2023-06-20T21:37:30.124Z", "tags": {}, "TemplateDescription": "Test SMS Template", "TemplateName": "TestTemplate", "TemplateType": "SMS", "Version": "1" } }
자세한 내용은 Amazon Pinpoint 사용자 안내서의 Amazon Pinpoint SMS 채널을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 GetSmsTemplate
을 참조하세요.
-
다음 코드 예시에서는 get-voice-channel
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션의 Voice 채널 상태 및 설정 정보 가져오기
다음
get-voice-channel
예시에서는 애플리케이션의 Voice 채널 상태 및 설정을 가져옵니다.aws pinpoint get-voice-channel \ --application-id
6e0b7591a90841d2b5d93fa11143e5a7
\ --regionus-east-1
출력:
{ "VoiceChannelResponse": { "ApplicationId": "6e0b7591a90841d2b5d93fa11143e5a7", "CreationDate": "2022-04-28T00:17:03.836Z", "Enabled": true, "Id": "voice", "IsArchived": false, "LastModifiedDate": "2022-04-28T00:17:03.836Z", "Platform": "VOICE", "Version": 1 } }
-
API 세부 정보는 AWS CLI 명령 참조의 GetVoiceChannel
을 참조합니다.
-
다음 코드 예시에서는 list-tags-for-resource
의 사용 방법을 보여줍니다.
- AWS CLI
-
리소스의 태그 목록 가져오기
다음
list-tags-for-resource
예시에서는 지정된 리소스에 연결된 모든 태그(키 이름 및 값)를 가져옵니다.aws pinpoint list-tags-for-resource \ --resource-arn
arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example
출력:
{ "TagsModel": { "tags": { "Year": "2019", "Stack": "Production" } } }
자세한 내용은 Amazon Pinpoint 개발자 안내서의 'Amazon Pinpoint 리소스 태그 지정'<https://docs.aws.amazon.com/pinpoint/latest/developerguide/tagging-resources.html>을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 ListTagsForResource
를 참조하세요.
-
다음 코드 예시에서는 phone-number-validate
의 사용 방법을 보여줍니다.
- AWS CLI
-
전화번호 정보 가져오기
다음
phone-number-validate
예시에서는 전화번호 정보를 가져옵니다.aws pinpoint phone-number-validate \ --number-validate-request PhoneNumber="+12065550142" \ --region
us-east-1
출력:
{ "NumberValidateResponse": { "Carrier": "ExampleCorp Mobile", "City": "Seattle", "CleansedPhoneNumberE164": "+12065550142", "CleansedPhoneNumberNational": "2065550142", "Country": "United States", "CountryCodeIso2": "US", "CountryCodeNumeric": "1", "OriginalPhoneNumber": "+12065550142", "PhoneType": "MOBILE", "PhoneTypeCode": 0, "Timezone": "America/Los_Angeles", "ZipCode": "98101" } }
자세한 내용은 Amazon Pinpoint 사용자 안내서의 Amazon Pinpoint SMS 채널을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 PhoneNumberValidate
를 참조하세요.
-
다음 코드 예시에서는 send-messages
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션의 엔드포인트를 사용하여 SMS 메시지 전송
다음
send-messages
예시에서는 엔드포인트가 있는 애플리케이션에 다이렉트 메시지를 보냅니다.aws pinpoint send-messages \ --application-id
611e3e3cdd47474c9c1399a505665b91
\ --message-requestfile://myfile.json
\ --regionus-west-2
myfile.json
의 콘텐츠:{ "MessageConfiguration": { "SMSMessage": { "Body": "hello, how are you?" } }, "Endpoints": { "testendpoint": {} } }
출력:
{ "MessageResponse": { "ApplicationId": "611e3e3cdd47474c9c1399a505665b91", "EndpointResult": { "testendpoint": { "Address": "+12345678900", "DeliveryStatus": "SUCCESSFUL", "MessageId": "itnuqhai5alf1n6ahv3udc05n7hhddr6gb3lq6g0", "StatusCode": 200, "StatusMessage": "MessageId: itnuqhai5alf1n6ahv3udc05n7hhddr6gb3lq6g0" } }, "RequestId": "c7e23264-04b2-4a46-b800-d24923f74753" } }
자세한 내용은 Amazon Pinpoint 사용자 안내서의 Amazon Pinpoint SMS 채널을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 SendMessages
를 참조하세요.
-
다음 코드 예시에서는 send-users-messages
의 사용 방법을 보여줍니다.
- AWS CLI
-
애플리케이션 사용자에게 SMS 메시지 전송
다음
send-users-messages
예시에서는 애플리케이션 사용자에게 다이렉트 메시지를 보냅니다.aws pinpoint send-users-messages \ --application-id
611e3e3cdd47474c9c1399a505665b91
\ --send-users-message-requestfile://myfile.json
\ --regionus-west-2
myfile.json
의 콘텐츠:{ "MessageConfiguration": { "SMSMessage": { "Body": "hello, how are you?" } }, "Users": { "testuser": {} } }
출력:
{ "SendUsersMessageResponse": { "ApplicationId": "611e3e3cdd47474c9c1399a505665b91", "RequestId": "e0b12cf5-2359-11e9-bb0b-d5fb91876b25", "Result": { "testuser": { "testuserendpoint": { "DeliveryStatus": "SUCCESSFUL", "MessageId": "7qu4hk5bqhda3i7i2n4pjf98qcuh8b7p45ifsmo0", "StatusCode": 200, "StatusMessage": "MessageId: 7qu4hk5bqhda3i7i2n4pjf98qcuh8b7p45ifsmo0", "Address": "+12345678900" } } } } }
자세한 내용은 Amazon Pinpoint 사용자 안내서의 Amazon Pinpoint SMS 채널을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 SendUsersMessages
를 참조하세요.
-
다음 코드 예시에서는 tag-resource
의 사용 방법을 보여줍니다.
- AWS CLI
-
리소스에 태그 추가
다음 예시에서는 리소스에 두 개의 태그(키 이름 및 값)를 추가합니다.
aws pinpoint list-tags-for-resource \ --resource-arn
arn:aws:mobiletargeting:us-east-1:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example
\ --tags-modeltags={Stack=Production,Year=2019}
이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Pinpoint 개발자 안내서의 'Amazon Pinpoint 리소스 태그 지정'<https://docs.aws.amazon.com/pinpoint/latest/developerguide/tagging-resources.html>을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 TagResource
를 참조하세요.
-
다음 코드 예시에서는 untag-resource
의 사용 방법을 보여줍니다.
- AWS CLI
-
예시 1: 리소스에서 태그 제거
다음
untag-resource
예시에서는 리소스에서 지정된 태그(키 이름 및 값)를 제거합니다.aws pinpoint untag-resource \ --resource-arn
arn:aws:mobiletargeting:us-west-2:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example
\ --tag-keysYear
이 명령은 출력을 생성하지 않습니다.
예시 2: 리소스에서 여러 태그 제거
다음
untag-resource
예시에서는 리소스에서 지정된 태그(키 이름 및 값)를 제거합니다.aws pinpoint untag-resource \ --resource-arn
arn:aws:mobiletargeting:us-east-1:AIDACKCEVSQ6C2EXAMPLE:apps/810c7aab86d42fb2b56c8c966example
\ --tag-keysYear
Stack
이 명령은 출력을 생성하지 않습니다.
자세한 내용은 Amazon Pinpoint 개발자 안내서의 'Amazon Pinpoint 리소스 태그 지정'<https://docs.aws.amazon.com/pinpoint/latest/developerguide/tagging-resources.html>을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 UntagResource
를 참조하세요.
-
다음 코드 예시에서는 update-sms-channel
의 사용 방법을 보여줍니다.
- AWS CLI
-
SMS 채널 활성화 또는 애플리케이션의 SMS 채널 상태 및 설정 업데이트
다음
update-sms-channel
예시에서는 애플리케이션의 SMS 채널을 활성화합니다.aws pinpoint update-sms-channel \ --application-id
611e3e3cdd47474c9c1399a505665b91
\ --sms-channel-requestEnabled=true
\ --regionus-west-2
출력:
{ "SMSChannelResponse": { "ApplicationId": "611e3e3cdd47474c9c1399a505665b91", "CreationDate": "2019-01-28T23:25:25.224Z", "Enabled": true, "Id": "sms", "IsArchived": false, "LastModifiedDate": "2023-05-18T23:22:50.977Z", "Platform": "SMS", "PromotionalMessagesPerSecond": 20, "TransactionalMessagesPerSecond": 20, "Version": 3 } }
자세한 내용은 Amazon Pinpoint 사용자 안내서의 Amazon Pinpoint SMS 채널을 참조하세요.
-
API 세부 정보는 AWS CLI 명령 참조의 UpdateSmsChannel
을 참조하세요.
-