-
Notifications
You must be signed in to change notification settings - Fork 580
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-pinpoint-sms-voice-v2): AWS End User Messaging SMS-Voice …
…V2 has added support for resource policies. Use the three new APIs to create, view, edit, and delete resource policies.
- Loading branch information
awstools
committed
Sep 24, 2024
1 parent
8212995
commit b449c45
Showing
14 changed files
with
1,150 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
clients/client-pinpoint-sms-voice-v2/src/commands/DeleteResourcePolicyCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 {} | ||
|
||
/** | ||
* <p>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.</p> | ||
* @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) | ||
* <p>The request was denied because you don't have sufficient permissions to access the | ||
* resource.</p> | ||
* | ||
* @throws {@link InternalServerException} (server fault) | ||
* <p>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.</p> | ||
* | ||
* @throws {@link ResourceNotFoundException} (client fault) | ||
* <p>A requested resource couldn't be found.</p> | ||
* | ||
* @throws {@link ThrottlingException} (client fault) | ||
* <p>An error that occurred because too many requests were sent during a certain amount of | ||
* time.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>A validation exception for a field.</p> | ||
* | ||
* @throws {@link PinpointSMSVoiceV2ServiceException} | ||
* <p>Base exception class for all service exceptions from PinpointSMSVoiceV2 service.</p> | ||
* | ||
* @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; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.