diff --git a/clients/client-pinpoint-sms-voice-v2/README.md b/clients/client-pinpoint-sms-voice-v2/README.md index 647d67824c9f..46006d6a29ab 100644 --- a/clients/client-pinpoint-sms-voice-v2/README.md +++ b/clients/client-pinpoint-sms-voice-v2/README.md @@ -442,6 +442,14 @@ DeleteRegistrationFieldValue [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint-sms-voice-v2/command/DeleteRegistrationFieldValueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/DeleteRegistrationFieldValueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/DeleteRegistrationFieldValueCommandOutput/) + +
+ +DeleteResourcePolicy + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint-sms-voice-v2/command/DeleteResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/DeleteResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/DeleteResourcePolicyCommandOutput/) +
@@ -650,6 +658,14 @@ GetProtectConfigurationCountryRuleSet [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint-sms-voice-v2/command/GetProtectConfigurationCountryRuleSetCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/GetProtectConfigurationCountryRuleSetCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/GetProtectConfigurationCountryRuleSetCommandOutput/) +
+
+ +GetResourcePolicy + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint-sms-voice-v2/command/GetResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/GetResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/GetResourcePolicyCommandOutput/) +
@@ -698,6 +714,14 @@ PutRegistrationFieldValue [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint-sms-voice-v2/command/PutRegistrationFieldValueCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/PutRegistrationFieldValueCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/PutRegistrationFieldValueCommandOutput/) +
+
+ +PutResourcePolicy + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/pinpoint-sms-voice-v2/command/PutResourcePolicyCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/PutResourcePolicyCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-pinpoint-sms-voice-v2/Interface/PutResourcePolicyCommandOutput/) +
diff --git a/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2.ts b/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2.ts index 8b4198c63fd7..a92c95198dda 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2.ts @@ -124,6 +124,11 @@ import { DeleteRegistrationFieldValueCommandInput, DeleteRegistrationFieldValueCommandOutput, } from "./commands/DeleteRegistrationFieldValueCommand"; +import { + DeleteResourcePolicyCommand, + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, +} from "./commands/DeleteResourcePolicyCommand"; import { DeleteTextMessageSpendLimitOverrideCommand, DeleteTextMessageSpendLimitOverrideCommandInput, @@ -254,6 +259,11 @@ import { GetProtectConfigurationCountryRuleSetCommandInput, GetProtectConfigurationCountryRuleSetCommandOutput, } from "./commands/GetProtectConfigurationCountryRuleSetCommand"; +import { + GetResourcePolicyCommand, + GetResourcePolicyCommandInput, + GetResourcePolicyCommandOutput, +} from "./commands/GetResourcePolicyCommand"; import { ListPoolOriginationIdentitiesCommand, ListPoolOriginationIdentitiesCommandInput, @@ -280,6 +290,11 @@ import { PutRegistrationFieldValueCommandInput, PutRegistrationFieldValueCommandOutput, } from "./commands/PutRegistrationFieldValueCommand"; +import { + PutResourcePolicyCommand, + PutResourcePolicyCommandInput, + PutResourcePolicyCommandOutput, +} from "./commands/PutResourcePolicyCommand"; import { ReleasePhoneNumberCommand, ReleasePhoneNumberCommandInput, @@ -421,6 +436,7 @@ const commands = { DeleteRegistrationCommand, DeleteRegistrationAttachmentCommand, DeleteRegistrationFieldValueCommand, + DeleteResourcePolicyCommand, DeleteTextMessageSpendLimitOverrideCommand, DeleteVerifiedDestinationNumberCommand, DeleteVoiceMessageSpendLimitOverrideCommand, @@ -447,12 +463,14 @@ const commands = { DisassociateProtectConfigurationCommand, DiscardRegistrationVersionCommand, GetProtectConfigurationCountryRuleSetCommand, + GetResourcePolicyCommand, ListPoolOriginationIdentitiesCommand, ListRegistrationAssociationsCommand, ListTagsForResourceCommand, PutKeywordCommand, PutOptedOutNumberCommand, PutRegistrationFieldValueCommand, + PutResourcePolicyCommand, ReleasePhoneNumberCommand, ReleaseSenderIdCommand, RequestPhoneNumberCommand, @@ -908,6 +926,23 @@ export interface PinpointSMSVoiceV2 { cb: (err: any, data?: DeleteRegistrationFieldValueCommandOutput) => void ): void; + /** + * @see {@link DeleteResourcePolicyCommand} + */ + deleteResourcePolicy( + args: DeleteResourcePolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteResourcePolicy( + args: DeleteResourcePolicyCommandInput, + cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void + ): void; + deleteResourcePolicy( + args: DeleteResourcePolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void + ): void; + /** * @see {@link DeleteTextMessageSpendLimitOverrideCommand} */ @@ -1359,6 +1394,23 @@ export interface PinpointSMSVoiceV2 { cb: (err: any, data?: GetProtectConfigurationCountryRuleSetCommandOutput) => void ): void; + /** + * @see {@link GetResourcePolicyCommand} + */ + getResourcePolicy( + args: GetResourcePolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getResourcePolicy( + args: GetResourcePolicyCommandInput, + cb: (err: any, data?: GetResourcePolicyCommandOutput) => void + ): void; + getResourcePolicy( + args: GetResourcePolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetResourcePolicyCommandOutput) => void + ): void; + /** * @see {@link ListPoolOriginationIdentitiesCommand} */ @@ -1455,6 +1507,23 @@ export interface PinpointSMSVoiceV2 { cb: (err: any, data?: PutRegistrationFieldValueCommandOutput) => void ): void; + /** + * @see {@link PutResourcePolicyCommand} + */ + putResourcePolicy( + args: PutResourcePolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + putResourcePolicy( + args: PutResourcePolicyCommandInput, + cb: (err: any, data?: PutResourcePolicyCommandOutput) => void + ): void; + putResourcePolicy( + args: PutResourcePolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutResourcePolicyCommandOutput) => void + ): void; + /** * @see {@link ReleasePhoneNumberCommand} */ diff --git a/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2Client.ts b/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2Client.ts index 569ed2ec7466..699da4468930 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2Client.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/PinpointSMSVoiceV2Client.ts @@ -136,6 +136,10 @@ import { DeleteRegistrationFieldValueCommandInput, DeleteRegistrationFieldValueCommandOutput, } from "./commands/DeleteRegistrationFieldValueCommand"; +import { + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, +} from "./commands/DeleteResourcePolicyCommand"; import { DeleteTextMessageSpendLimitOverrideCommandInput, DeleteTextMessageSpendLimitOverrideCommandOutput, @@ -231,6 +235,7 @@ import { GetProtectConfigurationCountryRuleSetCommandInput, GetProtectConfigurationCountryRuleSetCommandOutput, } from "./commands/GetProtectConfigurationCountryRuleSetCommand"; +import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "./commands/GetResourcePolicyCommand"; import { ListPoolOriginationIdentitiesCommandInput, ListPoolOriginationIdentitiesCommandOutput, @@ -249,6 +254,7 @@ import { PutRegistrationFieldValueCommandInput, PutRegistrationFieldValueCommandOutput, } from "./commands/PutRegistrationFieldValueCommand"; +import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "./commands/PutResourcePolicyCommand"; import { ReleasePhoneNumberCommandInput, ReleasePhoneNumberCommandOutput } from "./commands/ReleasePhoneNumberCommand"; import { ReleaseSenderIdCommandInput, ReleaseSenderIdCommandOutput } from "./commands/ReleaseSenderIdCommand"; import { RequestPhoneNumberCommandInput, RequestPhoneNumberCommandOutput } from "./commands/RequestPhoneNumberCommand"; @@ -347,6 +353,7 @@ export type ServiceInputTypes = | DeleteRegistrationAttachmentCommandInput | DeleteRegistrationCommandInput | DeleteRegistrationFieldValueCommandInput + | DeleteResourcePolicyCommandInput | DeleteTextMessageSpendLimitOverrideCommandInput | DeleteVerifiedDestinationNumberCommandInput | DeleteVoiceMessageSpendLimitOverrideCommandInput @@ -373,12 +380,14 @@ export type ServiceInputTypes = | DisassociateProtectConfigurationCommandInput | DiscardRegistrationVersionCommandInput | GetProtectConfigurationCountryRuleSetCommandInput + | GetResourcePolicyCommandInput | ListPoolOriginationIdentitiesCommandInput | ListRegistrationAssociationsCommandInput | ListTagsForResourceCommandInput | PutKeywordCommandInput | PutOptedOutNumberCommandInput | PutRegistrationFieldValueCommandInput + | PutResourcePolicyCommandInput | ReleasePhoneNumberCommandInput | ReleaseSenderIdCommandInput | RequestPhoneNumberCommandInput @@ -434,6 +443,7 @@ export type ServiceOutputTypes = | DeleteRegistrationAttachmentCommandOutput | DeleteRegistrationCommandOutput | DeleteRegistrationFieldValueCommandOutput + | DeleteResourcePolicyCommandOutput | DeleteTextMessageSpendLimitOverrideCommandOutput | DeleteVerifiedDestinationNumberCommandOutput | DeleteVoiceMessageSpendLimitOverrideCommandOutput @@ -460,12 +470,14 @@ export type ServiceOutputTypes = | DisassociateProtectConfigurationCommandOutput | DiscardRegistrationVersionCommandOutput | GetProtectConfigurationCountryRuleSetCommandOutput + | GetResourcePolicyCommandOutput | ListPoolOriginationIdentitiesCommandOutput | ListRegistrationAssociationsCommandOutput | ListTagsForResourceCommandOutput | PutKeywordCommandOutput | PutOptedOutNumberCommandOutput | PutRegistrationFieldValueCommandOutput + | PutResourcePolicyCommandOutput | ReleasePhoneNumberCommandOutput | ReleaseSenderIdCommandOutput | RequestPhoneNumberCommandOutput diff --git a/clients/client-pinpoint-sms-voice-v2/src/commands/DeleteResourcePolicyCommand.ts b/clients/client-pinpoint-sms-voice-v2/src/commands/DeleteResourcePolicyCommand.ts new file mode 100644 index 000000000000..6f0fa48a0a46 --- /dev/null +++ b/clients/client-pinpoint-sms-voice-v2/src/commands/DeleteResourcePolicyCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteResourcePolicyRequest, DeleteResourcePolicyResult } from "../models/models_0"; +import { + PinpointSMSVoiceV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../PinpointSMSVoiceV2Client"; +import { de_DeleteResourcePolicyCommand, se_DeleteResourcePolicyCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteResourcePolicyCommand}. + */ +export interface DeleteResourcePolicyCommandInput extends DeleteResourcePolicyRequest {} +/** + * @public + * + * The output of {@link DeleteResourcePolicyCommand}. + */ +export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyResult, __MetadataBearer {} + +/** + *

Deletes the resource-based policy document attached to the AWS End User Messaging SMS and Voice resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PinpointSMSVoiceV2Client, DeleteResourcePolicyCommand } from "@aws-sdk/client-pinpoint-sms-voice-v2"; // ES Modules import + * // const { PinpointSMSVoiceV2Client, DeleteResourcePolicyCommand } = require("@aws-sdk/client-pinpoint-sms-voice-v2"); // CommonJS import + * const client = new PinpointSMSVoiceV2Client(config); + * const input = { // DeleteResourcePolicyRequest + * ResourceArn: "STRING_VALUE", // required + * }; + * const command = new DeleteResourcePolicyCommand(input); + * const response = await client.send(command); + * // { // DeleteResourcePolicyResult + * // ResourceArn: "STRING_VALUE", + * // Policy: "STRING_VALUE", + * // CreatedTimestamp: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param DeleteResourcePolicyCommandInput - {@link DeleteResourcePolicyCommandInput} + * @returns {@link DeleteResourcePolicyCommandOutput} + * @see {@link DeleteResourcePolicyCommandInput} for command's `input` shape. + * @see {@link DeleteResourcePolicyCommandOutput} for command's `response` shape. + * @see {@link PinpointSMSVoiceV2ClientResolvedConfig | config} for PinpointSMSVoiceV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The request was denied because you don't have sufficient permissions to access the + * resource.

+ * + * @throws {@link InternalServerException} (server fault) + *

The API encountered an unexpected error and couldn't complete the request. You might + * be able to successfully issue the request again in the future.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

A requested resource couldn't be found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

An error that occurred because too many requests were sent during a certain amount of + * time.

+ * + * @throws {@link ValidationException} (client fault) + *

A validation exception for a field.

+ * + * @throws {@link PinpointSMSVoiceV2ServiceException} + *

Base exception class for all service exceptions from PinpointSMSVoiceV2 service.

+ * + * @public + */ +export class DeleteResourcePolicyCommand extends $Command + .classBuilder< + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, + PinpointSMSVoiceV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: PinpointSMSVoiceV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("PinpointSMSVoiceV2", "DeleteResourcePolicy", {}) + .n("PinpointSMSVoiceV2Client", "DeleteResourcePolicyCommand") + .f(void 0, void 0) + .ser(se_DeleteResourcePolicyCommand) + .de(de_DeleteResourcePolicyCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: DeleteResourcePolicyRequest; + output: DeleteResourcePolicyResult; + }; + sdk: { + input: DeleteResourcePolicyCommandInput; + output: DeleteResourcePolicyCommandOutput; + }; + }; +} diff --git a/clients/client-pinpoint-sms-voice-v2/src/commands/DescribeOptOutListsCommand.ts b/clients/client-pinpoint-sms-voice-v2/src/commands/DescribeOptOutListsCommand.ts index 774d82104d14..17434070f609 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/commands/DescribeOptOutListsCommand.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/commands/DescribeOptOutListsCommand.ts @@ -50,6 +50,7 @@ export interface DescribeOptOutListsCommandOutput extends DescribeOptOutListsRes * ], * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * Owner: "STRING_VALUE", * }; * const command = new DescribeOptOutListsCommand(input); * const response = await client.send(command); diff --git a/clients/client-pinpoint-sms-voice-v2/src/commands/DescribePhoneNumbersCommand.ts b/clients/client-pinpoint-sms-voice-v2/src/commands/DescribePhoneNumbersCommand.ts index ff97c8c33ab0..be9a52ecf1d9 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/commands/DescribePhoneNumbersCommand.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/commands/DescribePhoneNumbersCommand.ts @@ -59,6 +59,7 @@ export interface DescribePhoneNumbersCommandOutput extends DescribePhoneNumbersR * ], * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * Owner: "STRING_VALUE", * }; * const command = new DescribePhoneNumbersCommand(input); * const response = await client.send(command); diff --git a/clients/client-pinpoint-sms-voice-v2/src/commands/DescribePoolsCommand.ts b/clients/client-pinpoint-sms-voice-v2/src/commands/DescribePoolsCommand.ts index 9d869b9516a7..b88d8754eb68 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/commands/DescribePoolsCommand.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/commands/DescribePoolsCommand.ts @@ -62,6 +62,7 @@ export interface DescribePoolsCommandOutput extends DescribePoolsResult, __Metad * ], * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * Owner: "STRING_VALUE", * }; * const command = new DescribePoolsCommand(input); * const response = await client.send(command); diff --git a/clients/client-pinpoint-sms-voice-v2/src/commands/DescribeSenderIdsCommand.ts b/clients/client-pinpoint-sms-voice-v2/src/commands/DescribeSenderIdsCommand.ts index 82b32d2285ec..424fdbc38d5e 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/commands/DescribeSenderIdsCommand.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/commands/DescribeSenderIdsCommand.ts @@ -61,6 +61,7 @@ export interface DescribeSenderIdsCommandOutput extends DescribeSenderIdsResult, * ], * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * Owner: "STRING_VALUE", * }; * const command = new DescribeSenderIdsCommand(input); * const response = await client.send(command); diff --git a/clients/client-pinpoint-sms-voice-v2/src/commands/GetResourcePolicyCommand.ts b/clients/client-pinpoint-sms-voice-v2/src/commands/GetResourcePolicyCommand.ts new file mode 100644 index 000000000000..fa9df53d5d86 --- /dev/null +++ b/clients/client-pinpoint-sms-voice-v2/src/commands/GetResourcePolicyCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetResourcePolicyRequest, GetResourcePolicyResult } from "../models/models_0"; +import { + PinpointSMSVoiceV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../PinpointSMSVoiceV2Client"; +import { de_GetResourcePolicyCommand, se_GetResourcePolicyCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetResourcePolicyCommand}. + */ +export interface GetResourcePolicyCommandInput extends GetResourcePolicyRequest {} +/** + * @public + * + * The output of {@link GetResourcePolicyCommand}. + */ +export interface GetResourcePolicyCommandOutput extends GetResourcePolicyResult, __MetadataBearer {} + +/** + *

Retrieves the JSON text of the resource-based policy document attached to the AWS End User Messaging SMS and Voice resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PinpointSMSVoiceV2Client, GetResourcePolicyCommand } from "@aws-sdk/client-pinpoint-sms-voice-v2"; // ES Modules import + * // const { PinpointSMSVoiceV2Client, GetResourcePolicyCommand } = require("@aws-sdk/client-pinpoint-sms-voice-v2"); // CommonJS import + * const client = new PinpointSMSVoiceV2Client(config); + * const input = { // GetResourcePolicyRequest + * ResourceArn: "STRING_VALUE", // required + * }; + * const command = new GetResourcePolicyCommand(input); + * const response = await client.send(command); + * // { // GetResourcePolicyResult + * // ResourceArn: "STRING_VALUE", + * // Policy: "STRING_VALUE", + * // CreatedTimestamp: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param GetResourcePolicyCommandInput - {@link GetResourcePolicyCommandInput} + * @returns {@link GetResourcePolicyCommandOutput} + * @see {@link GetResourcePolicyCommandInput} for command's `input` shape. + * @see {@link GetResourcePolicyCommandOutput} for command's `response` shape. + * @see {@link PinpointSMSVoiceV2ClientResolvedConfig | config} for PinpointSMSVoiceV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The request was denied because you don't have sufficient permissions to access the + * resource.

+ * + * @throws {@link InternalServerException} (server fault) + *

The API encountered an unexpected error and couldn't complete the request. You might + * be able to successfully issue the request again in the future.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

A requested resource couldn't be found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

An error that occurred because too many requests were sent during a certain amount of + * time.

+ * + * @throws {@link ValidationException} (client fault) + *

A validation exception for a field.

+ * + * @throws {@link PinpointSMSVoiceV2ServiceException} + *

Base exception class for all service exceptions from PinpointSMSVoiceV2 service.

+ * + * @public + */ +export class GetResourcePolicyCommand extends $Command + .classBuilder< + GetResourcePolicyCommandInput, + GetResourcePolicyCommandOutput, + PinpointSMSVoiceV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: PinpointSMSVoiceV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("PinpointSMSVoiceV2", "GetResourcePolicy", {}) + .n("PinpointSMSVoiceV2Client", "GetResourcePolicyCommand") + .f(void 0, void 0) + .ser(se_GetResourcePolicyCommand) + .de(de_GetResourcePolicyCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: GetResourcePolicyRequest; + output: GetResourcePolicyResult; + }; + sdk: { + input: GetResourcePolicyCommandInput; + output: GetResourcePolicyCommandOutput; + }; + }; +} diff --git a/clients/client-pinpoint-sms-voice-v2/src/commands/PutResourcePolicyCommand.ts b/clients/client-pinpoint-sms-voice-v2/src/commands/PutResourcePolicyCommand.ts new file mode 100644 index 000000000000..50c8d6a0eb25 --- /dev/null +++ b/clients/client-pinpoint-sms-voice-v2/src/commands/PutResourcePolicyCommand.ts @@ -0,0 +1,119 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { PutResourcePolicyRequest, PutResourcePolicyResult } from "../models/models_0"; +import { + PinpointSMSVoiceV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../PinpointSMSVoiceV2Client"; +import { de_PutResourcePolicyCommand, se_PutResourcePolicyCommand } from "../protocols/Aws_json1_0"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link PutResourcePolicyCommand}. + */ +export interface PutResourcePolicyCommandInput extends PutResourcePolicyRequest {} +/** + * @public + * + * The output of {@link PutResourcePolicyCommand}. + */ +export interface PutResourcePolicyCommandOutput extends PutResourcePolicyResult, __MetadataBearer {} + +/** + *

Attaches a resource-based policy to a AWS End User Messaging SMS and Voice resource(phone number, sender Id, phone poll, or opt-out list) that is used for + * sharing the resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number. For more information about + * resource-based policies, see Working with shared resources in the AWS End User Messaging SMS User Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { PinpointSMSVoiceV2Client, PutResourcePolicyCommand } from "@aws-sdk/client-pinpoint-sms-voice-v2"; // ES Modules import + * // const { PinpointSMSVoiceV2Client, PutResourcePolicyCommand } = require("@aws-sdk/client-pinpoint-sms-voice-v2"); // CommonJS import + * const client = new PinpointSMSVoiceV2Client(config); + * const input = { // PutResourcePolicyRequest + * ResourceArn: "STRING_VALUE", // required + * Policy: "STRING_VALUE", // required + * }; + * const command = new PutResourcePolicyCommand(input); + * const response = await client.send(command); + * // { // PutResourcePolicyResult + * // ResourceArn: "STRING_VALUE", + * // Policy: "STRING_VALUE", + * // CreatedTimestamp: new Date("TIMESTAMP"), + * // }; + * + * ``` + * + * @param PutResourcePolicyCommandInput - {@link PutResourcePolicyCommandInput} + * @returns {@link PutResourcePolicyCommandOutput} + * @see {@link PutResourcePolicyCommandInput} for command's `input` shape. + * @see {@link PutResourcePolicyCommandOutput} for command's `response` shape. + * @see {@link PinpointSMSVoiceV2ClientResolvedConfig | config} for PinpointSMSVoiceV2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

The request was denied because you don't have sufficient permissions to access the + * resource.

+ * + * @throws {@link InternalServerException} (server fault) + *

The API encountered an unexpected error and couldn't complete the request. You might + * be able to successfully issue the request again in the future.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

A requested resource couldn't be found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

An error that occurred because too many requests were sent during a certain amount of + * time.

+ * + * @throws {@link ValidationException} (client fault) + *

A validation exception for a field.

+ * + * @throws {@link PinpointSMSVoiceV2ServiceException} + *

Base exception class for all service exceptions from PinpointSMSVoiceV2 service.

+ * + * @public + */ +export class PutResourcePolicyCommand extends $Command + .classBuilder< + PutResourcePolicyCommandInput, + PutResourcePolicyCommandOutput, + PinpointSMSVoiceV2ClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: PinpointSMSVoiceV2ClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("PinpointSMSVoiceV2", "PutResourcePolicy", {}) + .n("PinpointSMSVoiceV2Client", "PutResourcePolicyCommand") + .f(void 0, void 0) + .ser(se_PutResourcePolicyCommand) + .de(de_PutResourcePolicyCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: PutResourcePolicyRequest; + output: PutResourcePolicyResult; + }; + sdk: { + input: PutResourcePolicyCommandInput; + output: PutResourcePolicyCommandOutput; + }; + }; +} diff --git a/clients/client-pinpoint-sms-voice-v2/src/commands/index.ts b/clients/client-pinpoint-sms-voice-v2/src/commands/index.ts index e2b6afbf57b9..761eacd07e3b 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/commands/index.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/commands/index.ts @@ -25,6 +25,7 @@ export * from "./DeleteProtectConfigurationCommand"; export * from "./DeleteRegistrationAttachmentCommand"; export * from "./DeleteRegistrationCommand"; export * from "./DeleteRegistrationFieldValueCommand"; +export * from "./DeleteResourcePolicyCommand"; export * from "./DeleteTextMessageSpendLimitOverrideCommand"; export * from "./DeleteVerifiedDestinationNumberCommand"; export * from "./DeleteVoiceMessageSpendLimitOverrideCommand"; @@ -51,12 +52,14 @@ export * from "./DisassociateOriginationIdentityCommand"; export * from "./DisassociateProtectConfigurationCommand"; export * from "./DiscardRegistrationVersionCommand"; export * from "./GetProtectConfigurationCountryRuleSetCommand"; +export * from "./GetResourcePolicyCommand"; export * from "./ListPoolOriginationIdentitiesCommand"; export * from "./ListRegistrationAssociationsCommand"; export * from "./ListTagsForResourceCommand"; export * from "./PutKeywordCommand"; export * from "./PutOptedOutNumberCommand"; export * from "./PutRegistrationFieldValueCommand"; +export * from "./PutResourcePolicyCommand"; export * from "./ReleasePhoneNumberCommand"; export * from "./ReleaseSenderIdCommand"; export * from "./RequestPhoneNumberCommand"; diff --git a/clients/client-pinpoint-sms-voice-v2/src/models/models_0.ts b/clients/client-pinpoint-sms-voice-v2/src/models/models_0.ts index a2754e85c380..b2b55540b229 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/models/models_0.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/models/models_0.ts @@ -130,6 +130,9 @@ export interface AssociateOriginationIdentityRequest { /** *

The pool to update with the new Identity. This value can be either the PoolId or * PoolArn, and you can find these values using DescribePools.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PoolId: string | undefined; @@ -139,6 +142,9 @@ export interface AssociateOriginationIdentityRequest { * SenderIdArn. You can use DescribePhoneNumbers to find the values for * PhoneNumberId and PhoneNumberArn, while DescribeSenderIds can be used * to get the values for SenderId and SenderIdArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity: string | undefined; @@ -256,6 +262,7 @@ export const ResourceType = { OPTED_OUT_NUMBER: "opted-out-number", OPT_OUT_LIST: "opt-out-list", PHONE_NUMBER: "phone-number", + POLICY: "policy", POOL: "pool", PROTECT_CONFIGURATION: "protect-configuration", REGISTRATION: "registration", @@ -1124,6 +1131,9 @@ export interface CreatePoolRequest { * PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used * to get the values for SenderId and SenderIdArn.

*

After the pool is created you can add more origination identities to the pool by using AssociateOriginationIdentity.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity: string | undefined; @@ -2083,6 +2093,9 @@ export interface DeleteKeywordRequest { * PoolArn. You can use DescribePhoneNumbers to find the values for * PhoneNumberId and PhoneNumberArn and DescribePools to find the values * of PoolId and PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity: string | undefined; @@ -2166,6 +2179,9 @@ export interface DeleteMediaMessageSpendLimitOverrideResult { export interface DeleteOptedOutNumberRequest { /** *

The OptOutListName or OptOutListArn to remove the phone number from.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OptOutListName: string | undefined; @@ -2220,6 +2236,9 @@ export interface DeleteOptOutListRequest { /** *

The OptOutListName or OptOutListArn of the OptOutList to delete. You can use DescribeOptOutLists to find the values for OptOutListName and * OptOutListArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OptOutListName: string | undefined; @@ -2254,6 +2273,9 @@ export interface DeleteOptOutListResult { export interface DeletePoolRequest { /** *

The PoolId or PoolArn of the pool to delete. You can use DescribePools to find the values for PoolId and PoolArn .

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PoolId: string | undefined; @@ -2627,6 +2649,40 @@ export interface DeleteRegistrationFieldValueResult { RegistrationAttachmentId?: string; } +/** + * @public + */ +export interface DeleteResourcePolicyRequest { + /** + *

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource you're deleting the resource-based policy from.

+ * @public + */ + ResourceArn: string | undefined; +} + +/** + * @public + */ +export interface DeleteResourcePolicyResult { + /** + *

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource that the resource-based policy was deleted from.

+ * @public + */ + ResourceArn?: string; + + /** + *

The JSON formatted resource-based policy that was deleted.

+ * @public + */ + Policy?: string; + + /** + *

The time when the resource-based policy was created, in UNIX epoch time format.

+ * @public + */ + CreatedTimestamp?: Date; +} + /** * @public */ @@ -2860,6 +2916,9 @@ export interface DescribeKeywordsRequest { * SenderIdArn. You can use DescribePhoneNumbers to find the values for * PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used * to get the values for SenderId and SenderIdArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity: string | undefined; @@ -2982,6 +3041,9 @@ export interface DescribeOptedOutNumbersRequest { /** *

The OptOutListName or OptOutListArn of the OptOutList. You can use DescribeOptOutLists to find the values for OptOutListName and * OptOutListArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OptOutListName: string | undefined; @@ -3067,6 +3129,20 @@ export interface DescribeOptedOutNumbersResult { NextToken?: string; } +/** + * @public + * @enum + */ +export const Owner = { + SELF: "SELF", + SHARED: "SHARED", +} as const; + +/** + * @public + */ +export type Owner = (typeof Owner)[keyof typeof Owner]; + /** * @public */ @@ -3074,6 +3150,9 @@ export interface DescribeOptOutListsRequest { /** *

The OptOutLists to show the details of. This is an array of strings that can be either * the OptOutListName or OptOutListArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OptOutListNames?: string[]; @@ -3090,6 +3169,12 @@ export interface DescribeOptOutListsRequest { * @public */ MaxResults?: number; + + /** + *

Use SELF to filter the list of Opt-Out List to ones your account owns or use SHARED to filter on Opt-Out List shared with your account. The Owner and OptOutListNames parameters can't be used at the same time.

+ * @public + */ + Owner?: Owner; } /** @@ -3182,6 +3267,9 @@ export interface DescribePhoneNumbersRequest { /** *

The unique identifier of phone numbers to find information about. This is an array of * strings that can be either the PhoneNumberId or PhoneNumberArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PhoneNumberIds?: string[]; @@ -3204,6 +3292,12 @@ export interface DescribePhoneNumbersRequest { * @public */ MaxResults?: number; + + /** + *

Use SELF to filter the list of phone numbers to ones your account owns or use SHARED to filter on phone numbers shared with your account. The Owner and PhoneNumberIds parameters can't be used at the same time.

+ * @public + */ + Owner?: Owner; } /** @@ -3443,6 +3537,9 @@ export interface DescribePoolsRequest { /** *

The unique identifier of pools to find. This is an array of strings that can be either * the PoolId or PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PoolIds?: string[]; @@ -3465,6 +3562,12 @@ export interface DescribePoolsRequest { * @public */ MaxResults?: number; + + /** + *

Use SELF to filter the list of Pools to ones your account owns or use SHARED to filter on Pools shared with your account. The Owner and PoolIds parameters can't be used at the same time.

+ * @public + */ + Owner?: Owner; } /** @@ -4986,6 +5089,9 @@ export interface SenderIdAndCountry { export interface DescribeSenderIdsRequest { /** *

An array of SenderIdAndCountry objects to search for.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ SenderIds?: SenderIdAndCountry[]; @@ -5008,6 +5114,12 @@ export interface DescribeSenderIdsRequest { * @public */ MaxResults?: number; + + /** + *

Use SELF to filter the list of Sender Ids to ones your account owns or use SHARED to filter on Sender Ids shared with your account. The Owner and SenderIds parameters can't be used at the same time.

+ * @public + */ + Owner?: Owner; } /** @@ -5331,6 +5443,9 @@ export interface DisassociateOriginationIdentityRequest { /** *

The unique identifier for the pool to disassociate with the origination identity. This * value can be either the PoolId or PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PoolId: string | undefined; @@ -5340,6 +5455,9 @@ export interface DisassociateOriginationIdentityRequest { * SenderIdArn. You can use DescribePhoneNumbers find the values for * PhoneNumberId and PhoneNumberArn, or use DescribeSenderIds to get the * values for SenderId and SenderIdArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity: string | undefined; @@ -5595,6 +5713,40 @@ export interface GetProtectConfigurationCountryRuleSetResult { CountryRuleSet: Record | undefined; } +/** + * @public + */ +export interface GetResourcePolicyRequest { + /** + *

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource attached to the resource-based policy.

+ * @public + */ + ResourceArn: string | undefined; +} + +/** + * @public + */ +export interface GetResourcePolicyResult { + /** + *

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource attached to the resource-based policy.

+ * @public + */ + ResourceArn?: string; + + /** + *

The JSON formatted string that contains the resource-based policy attached to the AWS End User Messaging SMS and Voice resource.

+ * @public + */ + Policy?: string; + + /** + *

The time when the resource-based policy was created, in UNIX epoch time format.

+ * @public + */ + CreatedTimestamp?: Date; +} + /** * @public * @enum @@ -5661,6 +5813,9 @@ export interface ListPoolOriginationIdentitiesRequest { /** *

The unique identifier for the pool. This value can be either the PoolId or * PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PoolId: string | undefined; @@ -5926,6 +6081,9 @@ export interface PutKeywordRequest { * SenderIdArn. You can use DescribePhoneNumbers get the values for * PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used * to get the values for SenderId and SenderIdArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity: string | undefined; @@ -6001,6 +6159,9 @@ export interface PutKeywordResult { export interface PutOptedOutNumberRequest { /** *

The OptOutListName or OptOutListArn to add the phone number to.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OptOutListName: string | undefined; @@ -6130,6 +6291,46 @@ export interface PutRegistrationFieldValueResult { RegistrationAttachmentId?: string; } +/** + * @public + */ +export interface PutResourcePolicyRequest { + /** + *

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource to attach the resource-based policy to.

+ * @public + */ + ResourceArn: string | undefined; + + /** + *

The JSON formatted resource-based policy to attach.

+ * @public + */ + Policy: string | undefined; +} + +/** + * @public + */ +export interface PutResourcePolicyResult { + /** + *

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource attached to the resource-based policy.

+ * @public + */ + ResourceArn?: string; + + /** + *

The JSON formatted Resource Policy.

+ * @public + */ + Policy?: string; + + /** + *

The time when the resource-based policy was created, in UNIX epoch time format.

+ * @public + */ + CreatedTimestamp?: Date; +} + /** * @public */ @@ -6137,6 +6338,9 @@ export interface ReleasePhoneNumberRequest { /** *

The PhoneNumberId or PhoneNumberArn of the phone number to release. You can use DescribePhoneNumbers to get the values for PhoneNumberId and * PhoneNumberArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PhoneNumberId: string | undefined; @@ -6365,12 +6569,18 @@ export interface RequestPhoneNumberRequest { /** *

The name of the OptOutList to associate with the phone number. You can use the * OptOutListName or OptOutListArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OptOutListName?: string; /** *

The pool to associated with the phone number. You can use the PoolId or PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PoolId?: string; @@ -6673,6 +6883,9 @@ export interface SendDestinationNumberVerificationCodeRequest { /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity?: string; @@ -6725,6 +6938,9 @@ export interface SendMediaMessageRequest { /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity: string | undefined; @@ -6808,6 +7024,9 @@ export interface SendTextMessageRequest { /** *

The origination identity of the message. This can be either the PhoneNumber, * PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity?: string; @@ -7016,6 +7235,9 @@ export interface SendVoiceMessageRequest { /** *

The origination identity to use for the voice call. This can be the PhoneNumber, * PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OriginationIdentity: string | undefined; @@ -7491,6 +7713,9 @@ export interface UpdatePhoneNumberRequest { /** *

The unique identifier of the phone number. Valid values for this field can be either * the PhoneNumberId or PhoneNumberArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PhoneNumberId: string | undefined; @@ -7657,6 +7882,9 @@ export interface UpdatePoolRequest { /** *

The unique identifier of the pool to update. Valid values are either the PoolId or * PoolArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ PoolId: string | undefined; @@ -7693,6 +7921,9 @@ export interface UpdatePoolRequest { /** *

The OptOutList to associate with the pool. Valid values are either OptOutListName or * OptOutListArn.

+ * + *

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

+ *
* @public */ OptOutListName?: string; diff --git a/clients/client-pinpoint-sms-voice-v2/src/protocols/Aws_json1_0.ts b/clients/client-pinpoint-sms-voice-v2/src/protocols/Aws_json1_0.ts index c39a4d70677b..15e70555ba3d 100644 --- a/clients/client-pinpoint-sms-voice-v2/src/protocols/Aws_json1_0.ts +++ b/clients/client-pinpoint-sms-voice-v2/src/protocols/Aws_json1_0.ts @@ -105,6 +105,10 @@ import { DeleteRegistrationFieldValueCommandInput, DeleteRegistrationFieldValueCommandOutput, } from "../commands/DeleteRegistrationFieldValueCommand"; +import { + DeleteResourcePolicyCommandInput, + DeleteResourcePolicyCommandOutput, +} from "../commands/DeleteResourcePolicyCommand"; import { DeleteTextMessageSpendLimitOverrideCommandInput, DeleteTextMessageSpendLimitOverrideCommandOutput, @@ -200,6 +204,7 @@ import { GetProtectConfigurationCountryRuleSetCommandInput, GetProtectConfigurationCountryRuleSetCommandOutput, } from "../commands/GetProtectConfigurationCountryRuleSetCommand"; +import { GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput } from "../commands/GetResourcePolicyCommand"; import { ListPoolOriginationIdentitiesCommandInput, ListPoolOriginationIdentitiesCommandOutput, @@ -218,6 +223,7 @@ import { PutRegistrationFieldValueCommandInput, PutRegistrationFieldValueCommandOutput, } from "../commands/PutRegistrationFieldValueCommand"; +import { PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput } from "../commands/PutResourcePolicyCommand"; import { ReleasePhoneNumberCommandInput, ReleasePhoneNumberCommandOutput } from "../commands/ReleasePhoneNumberCommand"; import { ReleaseSenderIdCommandInput, ReleaseSenderIdCommandOutput } from "../commands/ReleaseSenderIdCommand"; import { RequestPhoneNumberCommandInput, RequestPhoneNumberCommandOutput } from "../commands/RequestPhoneNumberCommand"; @@ -322,6 +328,8 @@ import { DeleteRegistrationFieldValueRequest, DeleteRegistrationRequest, DeleteRegistrationResult, + DeleteResourcePolicyRequest, + DeleteResourcePolicyResult, DeleteTextMessageSpendLimitOverrideRequest, DeleteVerifiedDestinationNumberRequest, DeleteVerifiedDestinationNumberResult, @@ -362,6 +370,8 @@ import { DiscardRegistrationVersionResult, EventType, GetProtectConfigurationCountryRuleSetRequest, + GetResourcePolicyRequest, + GetResourcePolicyResult, InternalServerException, KeywordFilter, KinesisFirehoseDestination, @@ -385,6 +395,8 @@ import { PutOptedOutNumberRequest, PutOptedOutNumberResult, PutRegistrationFieldValueRequest, + PutResourcePolicyRequest, + PutResourcePolicyResult, RegistrationAssociationFilter, RegistrationAttachmentFilter, RegistrationAttachmentsInformation, @@ -776,6 +788,19 @@ export const se_DeleteRegistrationFieldValueCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0DeleteResourcePolicyCommand + */ +export const se_DeleteResourcePolicyCommand = async ( + input: DeleteResourcePolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteResourcePolicy"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0DeleteTextMessageSpendLimitOverrideCommand */ @@ -1114,6 +1139,19 @@ export const se_GetProtectConfigurationCountryRuleSetCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0GetResourcePolicyCommand + */ +export const se_GetResourcePolicyCommand = async ( + input: GetResourcePolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetResourcePolicy"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0ListPoolOriginationIdentitiesCommand */ @@ -1192,6 +1230,19 @@ export const se_PutRegistrationFieldValueCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_0PutResourcePolicyCommand + */ +export const se_PutResourcePolicyCommand = async ( + input: PutResourcePolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("PutResourcePolicy"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_0ReleasePhoneNumberCommand */ @@ -2024,6 +2075,26 @@ export const de_DeleteRegistrationFieldValueCommand = async ( return response; }; +/** + * deserializeAws_json1_0DeleteResourcePolicyCommand + */ +export const de_DeleteResourcePolicyCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DeleteResourcePolicyResult(data, context); + const response: DeleteResourcePolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_0DeleteTextMessageSpendLimitOverrideCommand */ @@ -2544,6 +2615,26 @@ export const de_GetProtectConfigurationCountryRuleSetCommand = async ( return response; }; +/** + * deserializeAws_json1_0GetResourcePolicyCommand + */ +export const de_GetResourcePolicyCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetResourcePolicyResult(data, context); + const response: GetResourcePolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_0ListPoolOriginationIdentitiesCommand */ @@ -2664,6 +2755,26 @@ export const de_PutRegistrationFieldValueCommand = async ( return response; }; +/** + * deserializeAws_json1_0PutResourcePolicyCommand + */ +export const de_PutResourcePolicyCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_PutResourcePolicyResult(data, context); + const response: PutResourcePolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + /** * deserializeAws_json1_0ReleasePhoneNumberCommand */ @@ -3452,6 +3563,8 @@ const se_CreateVerifiedDestinationNumberRequest = ( // se_DeleteRegistrationRequest omitted. +// se_DeleteResourcePolicyRequest omitted. + // se_DeleteTextMessageSpendLimitOverrideRequest omitted. // se_DeleteVerifiedDestinationNumberRequest omitted. @@ -3527,6 +3640,8 @@ const se_DisassociateOriginationIdentityRequest = ( // se_GetProtectConfigurationCountryRuleSetRequest omitted. +// se_GetResourcePolicyRequest omitted. + // se_KeywordFilter omitted. // se_KeywordFilterList omitted. @@ -3589,6 +3704,8 @@ const se_DisassociateOriginationIdentityRequest = ( // se_PutRegistrationFieldValueRequest omitted. +// se_PutResourcePolicyRequest omitted. + // se_RegistrationAssociationFilter omitted. // se_RegistrationAssociationFilterList omitted. @@ -4012,6 +4129,17 @@ const de_DeleteRegistrationResult = (output: any, context: __SerdeContext): Dele }) as any; }; +/** + * deserializeAws_json1_0DeleteResourcePolicyResult + */ +const de_DeleteResourcePolicyResult = (output: any, context: __SerdeContext): DeleteResourcePolicyResult => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Policy: __expectString, + ResourceArn: __expectString, + }) as any; +}; + // de_DeleteTextMessageSpendLimitOverrideResult omitted. /** @@ -4193,6 +4321,17 @@ const de_DiscardRegistrationVersionResult = ( // de_GetProtectConfigurationCountryRuleSetResult omitted. +/** + * deserializeAws_json1_0GetResourcePolicyResult + */ +const de_GetResourcePolicyResult = (output: any, context: __SerdeContext): GetResourcePolicyResult => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Policy: __expectString, + ResourceArn: __expectString, + }) as any; +}; + // de_InternalServerException omitted. // de_KeywordInformation omitted. @@ -4380,6 +4519,17 @@ const de_PutOptedOutNumberResult = (output: any, context: __SerdeContext): PutOp // de_PutRegistrationFieldValueResult omitted. +/** + * deserializeAws_json1_0PutResourcePolicyResult + */ +const de_PutResourcePolicyResult = (output: any, context: __SerdeContext): PutResourcePolicyResult => { + return take(output, { + CreatedTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + Policy: __expectString, + ResourceArn: __expectString, + }) as any; +}; + // de_RegistrationAssociationMetadata omitted. // de_RegistrationAssociationMetadataList omitted. diff --git a/codegen/sdk-codegen/aws-models/pinpoint-sms-voice-v2.json b/codegen/sdk-codegen/aws-models/pinpoint-sms-voice-v2.json index 911b319c9d04..e8f929f60d0c 100644 --- a/codegen/sdk-codegen/aws-models/pinpoint-sms-voice-v2.json +++ b/codegen/sdk-codegen/aws-models/pinpoint-sms-voice-v2.json @@ -204,14 +204,14 @@ "PoolId": { "target": "com.amazonaws.pinpointsmsvoicev2#PoolIdOrArn", "traits": { - "smithy.api#documentation": "

The pool to update with the new Identity. This value can be either the PoolId or\n PoolArn, and you can find these values using DescribePools.

", + "smithy.api#documentation": "

The pool to update with the new Identity. This value can be either the PoolId or\n PoolArn, and you can find these values using DescribePools.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneOrSenderIdOrArn", "traits": { - "smithy.api#documentation": "

The origination identity to use, such as PhoneNumberId, PhoneNumberArn, SenderId, or\n SenderIdArn. You can use DescribePhoneNumbers to find the values for\n PhoneNumberId and PhoneNumberArn, while DescribeSenderIds can be used\n to get the values for SenderId and SenderIdArn.

", + "smithy.api#documentation": "

The origination identity to use, such as PhoneNumberId, PhoneNumberArn, SenderId, or\n SenderIdArn. You can use DescribePhoneNumbers to find the values for\n PhoneNumberId and PhoneNumberArn, while DescribeSenderIds can be used\n to get the values for SenderId and SenderIdArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -1149,7 +1149,7 @@ "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneOrSenderIdOrArn", "traits": { - "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or\n SenderIdArn. You can use DescribePhoneNumbers to find the values for\n PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used\n to get the values for SenderId and SenderIdArn.

\n

After the pool is created you can add more origination identities to the pool by using AssociateOriginationIdentity.

", + "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or\n SenderIdArn. You can use DescribePhoneNumbers to find the values for\n PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used\n to get the values for SenderId and SenderIdArn.

\n

After the pool is created you can add more origination identities to the pool by using AssociateOriginationIdentity.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -2339,7 +2339,7 @@ "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneOrPoolIdOrArn", "traits": { - "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, PoolId or\n PoolArn. You can use DescribePhoneNumbers to find the values for\n PhoneNumberId and PhoneNumberArn and DescribePools to find the values\n of PoolId and PoolArn.

", + "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, PoolId or\n PoolArn. You can use DescribePhoneNumbers to find the values for\n PhoneNumberId and PhoneNumberArn and DescribePools to find the values\n of PoolId and PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -2478,7 +2478,7 @@ "OptOutListName": { "target": "com.amazonaws.pinpointsmsvoicev2#OptOutListNameOrArn", "traits": { - "smithy.api#documentation": "

The OptOutListName or OptOutListArn of the OptOutList to delete. You can use DescribeOptOutLists to find the values for OptOutListName and\n OptOutListArn.

", + "smithy.api#documentation": "

The OptOutListName or OptOutListArn of the OptOutList to delete. You can use DescribeOptOutLists to find the values for OptOutListName and\n OptOutListArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } } @@ -2551,7 +2551,7 @@ "OptOutListName": { "target": "com.amazonaws.pinpointsmsvoicev2#OptOutListNameOrArn", "traits": { - "smithy.api#documentation": "

The OptOutListName or OptOutListArn to remove the phone number from.

", + "smithy.api#documentation": "

The OptOutListName or OptOutListArn to remove the phone number from.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -2644,7 +2644,7 @@ "PoolId": { "target": "com.amazonaws.pinpointsmsvoicev2#PoolIdOrArn", "traits": { - "smithy.api#documentation": "

The PoolId or PoolArn of the pool to delete. You can use DescribePools to find the values for PoolId and PoolArn .

", + "smithy.api#documentation": "

The PoolId or PoolArn of the pool to delete. You can use DescribePools to find the values for PoolId and PoolArn .

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } } @@ -3134,6 +3134,76 @@ "smithy.api#output": {} } }, + "com.amazonaws.pinpointsmsvoicev2#DeleteResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.pinpointsmsvoicev2#DeleteResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.pinpointsmsvoicev2#DeleteResourcePolicyResult" + }, + "errors": [ + { + "target": "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#InternalServerException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ThrottlingException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the resource-based policy document attached to the AWS End User Messaging SMS and Voice resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number.

" + } + }, + "com.amazonaws.pinpointsmsvoicev2#DeleteResourcePolicyRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.pinpointsmsvoicev2#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource you're deleting the resource-based policy from.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pinpointsmsvoicev2#DeleteResourcePolicyResult": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.pinpointsmsvoicev2#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource that the resource-based policy was deleted from.

" + } + }, + "Policy": { + "target": "com.amazonaws.pinpointsmsvoicev2#ResourcePolicy", + "traits": { + "smithy.api#documentation": "

The JSON formatted resource-based policy that was deleted.

" + } + }, + "CreatedTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time when the resource-based policy was created, in UNIX epoch time format.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.pinpointsmsvoicev2#DeleteTextMessageSpendLimitOverride": { "type": "operation", "input": { @@ -3581,7 +3651,7 @@ "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneOrPoolIdOrArn", "traits": { - "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or\n SenderIdArn. You can use DescribePhoneNumbers to find the values for\n PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used\n to get the values for SenderId and SenderIdArn.

", + "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or\n SenderIdArn. You can use DescribePhoneNumbers to find the values for\n PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used\n to get the values for SenderId and SenderIdArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -3684,7 +3754,7 @@ "OptOutListNames": { "target": "com.amazonaws.pinpointsmsvoicev2#OptOutListNameList", "traits": { - "smithy.api#documentation": "

The OptOutLists to show the details of. This is an array of strings that can be either\n the OptOutListName or OptOutListArn.

" + "smithy.api#documentation": "

The OptOutLists to show the details of. This is an array of strings that can be either\n the OptOutListName or OptOutListArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "NextToken": { @@ -3698,6 +3768,12 @@ "traits": { "smithy.api#documentation": "

The maximum number of results to return per each request.

" } + }, + "Owner": { + "target": "com.amazonaws.pinpointsmsvoicev2#Owner", + "traits": { + "smithy.api#documentation": "

Use SELF to filter the list of Opt-Out List to ones your account owns or use SHARED to filter on Opt-Out List shared with your account. The Owner and OptOutListNames parameters can't be used at the same time.

" + } } }, "traits": { @@ -3762,7 +3838,7 @@ "OptOutListName": { "target": "com.amazonaws.pinpointsmsvoicev2#OptOutListNameOrArn", "traits": { - "smithy.api#documentation": "

The OptOutListName or OptOutListArn of the OptOutList. You can use DescribeOptOutLists to find the values for OptOutListName and\n OptOutListArn.

", + "smithy.api#documentation": "

The OptOutListName or OptOutListArn of the OptOutList. You can use DescribeOptOutLists to find the values for OptOutListName and\n OptOutListArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -3865,7 +3941,7 @@ "PhoneNumberIds": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneNumberIdList", "traits": { - "smithy.api#documentation": "

The unique identifier of phone numbers to find information about. This is an array of\n strings that can be either the PhoneNumberId or PhoneNumberArn.

" + "smithy.api#documentation": "

The unique identifier of phone numbers to find information about. This is an array of\n strings that can be either the PhoneNumberId or PhoneNumberArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "Filters": { @@ -3885,6 +3961,12 @@ "traits": { "smithy.api#documentation": "

The maximum number of results to return per each request.

" } + }, + "Owner": { + "target": "com.amazonaws.pinpointsmsvoicev2#Owner", + "traits": { + "smithy.api#documentation": "

Use SELF to filter the list of phone numbers to ones your account owns or use SHARED to filter on phone numbers shared with your account. The Owner and PhoneNumberIds parameters can't be used at the same time.

" + } } }, "traits": { @@ -3949,7 +4031,7 @@ "PoolIds": { "target": "com.amazonaws.pinpointsmsvoicev2#PoolIdList", "traits": { - "smithy.api#documentation": "

The unique identifier of pools to find. This is an array of strings that can be either\n the PoolId or PoolArn.

" + "smithy.api#documentation": "

The unique identifier of pools to find. This is an array of strings that can be either\n the PoolId or PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "Filters": { @@ -3969,6 +4051,12 @@ "traits": { "smithy.api#documentation": "

The maximum number of results to return per each request.

" } + }, + "Owner": { + "target": "com.amazonaws.pinpointsmsvoicev2#Owner", + "traits": { + "smithy.api#documentation": "

Use SELF to filter the list of Pools to ones your account owns or use SHARED to filter on Pools shared with your account. The Owner and PoolIds parameters can't be used at the same time.

" + } } }, "traits": { @@ -4780,7 +4868,7 @@ "SenderIds": { "target": "com.amazonaws.pinpointsmsvoicev2#SenderIdList", "traits": { - "smithy.api#documentation": "

An array of SenderIdAndCountry objects to search for.

" + "smithy.api#documentation": "

An array of SenderIdAndCountry objects to search for.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "Filters": { @@ -4800,6 +4888,12 @@ "traits": { "smithy.api#documentation": "

The maximum number of results to return per each request.

" } + }, + "Owner": { + "target": "com.amazonaws.pinpointsmsvoicev2#Owner", + "traits": { + "smithy.api#documentation": "

Use SELF to filter the list of Sender Ids to ones your account owns or use SHARED to filter on Sender Ids shared with your account. The Owner and SenderIds parameters can't be used at the same time.

" + } } }, "traits": { @@ -5074,14 +5168,14 @@ "PoolId": { "target": "com.amazonaws.pinpointsmsvoicev2#PoolIdOrArn", "traits": { - "smithy.api#documentation": "

The unique identifier for the pool to disassociate with the origination identity. This\n value can be either the PoolId or PoolArn.

", + "smithy.api#documentation": "

The unique identifier for the pool to disassociate with the origination identity. This\n value can be either the PoolId or PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneOrSenderIdOrArn", "traits": { - "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or\n SenderIdArn. You can use DescribePhoneNumbers find the values for\n PhoneNumberId and PhoneNumberArn, or use DescribeSenderIds to get the\n values for SenderId and SenderIdArn.

", + "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or\n SenderIdArn. You can use DescribePhoneNumbers find the values for\n PhoneNumberId and PhoneNumberArn, or use DescribeSenderIds to get the\n values for SenderId and SenderIdArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -5740,6 +5834,76 @@ "smithy.api#output": {} } }, + "com.amazonaws.pinpointsmsvoicev2#GetResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.pinpointsmsvoicev2#GetResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.pinpointsmsvoicev2#GetResourcePolicyResult" + }, + "errors": [ + { + "target": "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#InternalServerException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ThrottlingException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the JSON text of the resource-based policy document attached to the AWS End User Messaging SMS and Voice resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number.

" + } + }, + "com.amazonaws.pinpointsmsvoicev2#GetResourcePolicyRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.pinpointsmsvoicev2#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource attached to the resource-based policy.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pinpointsmsvoicev2#GetResourcePolicyResult": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.pinpointsmsvoicev2#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource attached to the resource-based policy.

" + } + }, + "Policy": { + "target": "com.amazonaws.pinpointsmsvoicev2#ResourcePolicy", + "traits": { + "smithy.api#documentation": "

The JSON formatted string that contains the resource-based policy attached to the AWS End User Messaging SMS and Voice resource.

" + } + }, + "CreatedTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time when the resource-based policy was created, in UNIX epoch time format.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.pinpointsmsvoicev2#IamRoleArn": { "type": "string", "traits": { @@ -6027,7 +6191,7 @@ "PoolId": { "target": "com.amazonaws.pinpointsmsvoicev2#PoolIdOrArn", "traits": { - "smithy.api#documentation": "

The unique identifier for the pool. This value can be either the PoolId or\n PoolArn.

", + "smithy.api#documentation": "

The unique identifier for the pool. This value can be either the PoolId or\n PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -6665,6 +6829,21 @@ "target": "com.amazonaws.pinpointsmsvoicev2#OriginationIdentityMetadata" } }, + "com.amazonaws.pinpointsmsvoicev2#Owner": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "SELF", + "name": "SELF" + }, + { + "value": "SHARED", + "name": "SHARED" + } + ] + } + }, "com.amazonaws.pinpointsmsvoicev2#PhoneNumber": { "type": "string", "traits": { @@ -7016,6 +7195,9 @@ { "target": "com.amazonaws.pinpointsmsvoicev2#DeleteRegistrationFieldValue" }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#DeleteResourcePolicy" + }, { "target": "com.amazonaws.pinpointsmsvoicev2#DeleteTextMessageSpendLimitOverride" }, @@ -7094,6 +7276,9 @@ { "target": "com.amazonaws.pinpointsmsvoicev2#GetProtectConfigurationCountryRuleSet" }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#GetResourcePolicy" + }, { "target": "com.amazonaws.pinpointsmsvoicev2#ListPoolOriginationIdentities" }, @@ -7112,6 +7297,9 @@ { "target": "com.amazonaws.pinpointsmsvoicev2#PutRegistrationFieldValue" }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#PutResourcePolicy" + }, { "target": "com.amazonaws.pinpointsmsvoicev2#ReleasePhoneNumber" }, @@ -8454,7 +8642,7 @@ "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneOrPoolIdOrArn", "traits": { - "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or\n SenderIdArn. You can use DescribePhoneNumbers get the values for\n PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used\n to get the values for SenderId and SenderIdArn.

", + "smithy.api#documentation": "

The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or\n SenderIdArn. You can use DescribePhoneNumbers get the values for\n PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used\n to get the values for SenderId and SenderIdArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -8556,7 +8744,7 @@ "OptOutListName": { "target": "com.amazonaws.pinpointsmsvoicev2#OptOutListNameOrArn", "traits": { - "smithy.api#documentation": "

The OptOutListName or OptOutListArn to add the phone number to.

", + "smithy.api#documentation": "

The OptOutListName or OptOutListArn to add the phone number to.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -8737,6 +8925,83 @@ "smithy.api#output": {} } }, + "com.amazonaws.pinpointsmsvoicev2#PutResourcePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.pinpointsmsvoicev2#PutResourcePolicyRequest" + }, + "output": { + "target": "com.amazonaws.pinpointsmsvoicev2#PutResourcePolicyResult" + }, + "errors": [ + { + "target": "com.amazonaws.pinpointsmsvoicev2#AccessDeniedException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#InternalServerException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ThrottlingException" + }, + { + "target": "com.amazonaws.pinpointsmsvoicev2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Attaches a resource-based policy to a AWS End User Messaging SMS and Voice resource(phone number, sender Id, phone poll, or opt-out list) that is used for\n sharing the resource. A shared resource can be a Pool, Opt-out list, Sender Id, or Phone number. For more information about\n resource-based policies, see Working with shared resources in the AWS End User Messaging SMS User Guide.

" + } + }, + "com.amazonaws.pinpointsmsvoicev2#PutResourcePolicyRequest": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.pinpointsmsvoicev2#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource to attach the resource-based policy to.

", + "smithy.api#required": {} + } + }, + "Policy": { + "target": "com.amazonaws.pinpointsmsvoicev2#ResourcePolicy", + "traits": { + "smithy.api#documentation": "

The JSON formatted resource-based policy to attach.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.pinpointsmsvoicev2#PutResourcePolicyResult": { + "type": "structure", + "members": { + "ResourceArn": { + "target": "com.amazonaws.pinpointsmsvoicev2#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS End User Messaging SMS and Voice resource attached to the resource-based policy.

" + } + }, + "Policy": { + "target": "com.amazonaws.pinpointsmsvoicev2#ResourcePolicy", + "traits": { + "smithy.api#documentation": "

The JSON formatted Resource Policy.

" + } + }, + "CreatedTimestamp": { + "target": "smithy.api#Timestamp", + "traits": { + "smithy.api#documentation": "

The time when the resource-based policy was created, in UNIX epoch time format.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.pinpointsmsvoicev2#RegistrationAssociationBehavior": { "type": "string", "traits": { @@ -9824,7 +10089,7 @@ "PhoneNumberId": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneNumberIdOrArn", "traits": { - "smithy.api#documentation": "

The PhoneNumberId or PhoneNumberArn of the phone number to release. You can use DescribePhoneNumbers to get the values for PhoneNumberId and\n PhoneNumberArn.

", + "smithy.api#documentation": "

The PhoneNumberId or PhoneNumberArn of the phone number to release. You can use DescribePhoneNumbers to get the values for PhoneNumberId and\n PhoneNumberArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } } @@ -10119,13 +10384,13 @@ "OptOutListName": { "target": "com.amazonaws.pinpointsmsvoicev2#OptOutListNameOrArn", "traits": { - "smithy.api#documentation": "

The name of the OptOutList to associate with the phone number. You can use the\n OptOutListName or OptOutListArn.

" + "smithy.api#documentation": "

The name of the OptOutList to associate with the phone number. You can use the\n OptOutListName or OptOutListArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "PoolId": { "target": "com.amazonaws.pinpointsmsvoicev2#PoolIdOrArn", "traits": { - "smithy.api#documentation": "

The pool to associated with the phone number. You can use the PoolId or PoolArn.

" + "smithy.api#documentation": "

The pool to associated with the phone number. You can use the PoolId or PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "RegistrationId": { @@ -10484,6 +10749,15 @@ "smithy.api#error": "client" } }, + "com.amazonaws.pinpointsmsvoicev2#ResourcePolicy": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10000 + } + } + }, "com.amazonaws.pinpointsmsvoicev2#ResourceType": { "type": "string", "traits": { @@ -10539,6 +10813,10 @@ { "value": "protect-configuration", "name": "PROTECT_CONFIGURATION" + }, + { + "value": "policy", + "name": "POLICY" } ] } @@ -10707,7 +10985,7 @@ "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#VerificationMessageOriginationIdentity", "traits": { - "smithy.api#documentation": "

The origination identity of the message. This can be either the PhoneNumber,\n PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

" + "smithy.api#documentation": "

The origination identity of the message. This can be either the PhoneNumber,\n PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "ConfigurationSetName": { @@ -10796,7 +11074,7 @@ "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#MediaMessageOriginationIdentity", "traits": { - "smithy.api#documentation": "

The origination identity of the message. This can be either the PhoneNumber,\n PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

", + "smithy.api#documentation": "

The origination identity of the message. This can be either the PhoneNumber,\n PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -10916,7 +11194,7 @@ "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#TextMessageOriginationIdentity", "traits": { - "smithy.api#documentation": "

The origination identity of the message. This can be either the PhoneNumber,\n PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

" + "smithy.api#documentation": "

The origination identity of the message. This can be either the PhoneNumber,\n PhoneNumberId, PhoneNumberArn, SenderId, SenderIdArn, PoolId, or PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "MessageBody": { @@ -11047,7 +11325,7 @@ "OriginationIdentity": { "target": "com.amazonaws.pinpointsmsvoicev2#VoiceMessageOriginationIdentity", "traits": { - "smithy.api#documentation": "

The origination identity to use for the voice call. This can be the PhoneNumber,\n PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.

", + "smithy.api#documentation": "

The origination identity to use for the voice call. This can be the PhoneNumber,\n PhoneNumberId, PhoneNumberArn, PoolId, or PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -12469,7 +12747,7 @@ "PhoneNumberId": { "target": "com.amazonaws.pinpointsmsvoicev2#PhoneNumberIdOrArn", "traits": { - "smithy.api#documentation": "

The unique identifier of the phone number. Valid values for this field can be either\n the PhoneNumberId or PhoneNumberArn.

", + "smithy.api#documentation": "

The unique identifier of the phone number. Valid values for this field can be either\n the PhoneNumberId or PhoneNumberArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -12665,7 +12943,7 @@ "PoolId": { "target": "com.amazonaws.pinpointsmsvoicev2#PoolIdOrArn", "traits": { - "smithy.api#documentation": "

The unique identifier of the pool to update. Valid values are either the PoolId or\n PoolArn.

", + "smithy.api#documentation": "

The unique identifier of the pool to update. Valid values are either the PoolId or\n PoolArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
", "smithy.api#required": {} } }, @@ -12696,7 +12974,7 @@ "OptOutListName": { "target": "com.amazonaws.pinpointsmsvoicev2#OptOutListNameOrArn", "traits": { - "smithy.api#documentation": "

The OptOutList to associate with the pool. Valid values are either OptOutListName or\n OptOutListArn.

" + "smithy.api#documentation": "

The OptOutList to associate with the pool. Valid values are either OptOutListName or\n OptOutListArn.

\n \n

If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).

\n
" } }, "SharedRoutesEnabled": {