-
Notifications
You must be signed in to change notification settings - Fork 582
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-repostspace): Adds the BatchAddRole and BatchRemoveRole A…
…PIs.
- Loading branch information
awstools
committed
Oct 22, 2024
1 parent
eae7a3e
commit fa3d3d0
Showing
10 changed files
with
944 additions
and
126 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
120 changes: 120 additions & 0 deletions
120
clients/client-repostspace/src/commands/BatchAddRoleCommand.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,120 @@ | ||
// 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 { BatchAddRoleInput, BatchAddRoleOutput } from "../models/models_0"; | ||
import { de_BatchAddRoleCommand, se_BatchAddRoleCommand } from "../protocols/Aws_restJson1"; | ||
import { RepostspaceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RepostspaceClient"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link BatchAddRoleCommand}. | ||
*/ | ||
export interface BatchAddRoleCommandInput extends BatchAddRoleInput {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link BatchAddRoleCommand}. | ||
*/ | ||
export interface BatchAddRoleCommandOutput extends BatchAddRoleOutput, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Add role to multiple users or groups in a private re:Post.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { RepostspaceClient, BatchAddRoleCommand } from "@aws-sdk/client-repostspace"; // ES Modules import | ||
* // const { RepostspaceClient, BatchAddRoleCommand } = require("@aws-sdk/client-repostspace"); // CommonJS import | ||
* const client = new RepostspaceClient(config); | ||
* const input = { // BatchAddRoleInput | ||
* spaceId: "STRING_VALUE", // required | ||
* accessorIds: [ // AccessorIdList // required | ||
* "STRING_VALUE", | ||
* ], | ||
* role: "EXPERT" || "MODERATOR" || "ADMINISTRATOR" || "SUPPORTREQUESTOR", // required | ||
* }; | ||
* const command = new BatchAddRoleCommand(input); | ||
* const response = await client.send(command); | ||
* // { // BatchAddRoleOutput | ||
* // addedAccessorIds: [ // AccessorIdList // required | ||
* // "STRING_VALUE", | ||
* // ], | ||
* // errors: [ // BatchErrorList // required | ||
* // { // BatchError | ||
* // accessorId: "STRING_VALUE", // required | ||
* // error: Number("int"), // required | ||
* // message: "STRING_VALUE", // required | ||
* // }, | ||
* // ], | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param BatchAddRoleCommandInput - {@link BatchAddRoleCommandInput} | ||
* @returns {@link BatchAddRoleCommandOutput} | ||
* @see {@link BatchAddRoleCommandInput} for command's `input` shape. | ||
* @see {@link BatchAddRoleCommandOutput} for command's `response` shape. | ||
* @see {@link RepostspaceClientResolvedConfig | config} for RepostspaceClient's `config` shape. | ||
* | ||
* @throws {@link AccessDeniedException} (client fault) | ||
* <p>User does not have sufficient access to perform this action.</p> | ||
* | ||
* @throws {@link InternalServerException} (server fault) | ||
* <p>Unexpected error during processing of request.</p> | ||
* | ||
* @throws {@link ResourceNotFoundException} (client fault) | ||
* <p>Request references a resource which does not exist.</p> | ||
* | ||
* @throws {@link ThrottlingException} (client fault) | ||
* <p>Request was denied due to request throttling.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>The input fails to satisfy the constraints specified by an AWS service.</p> | ||
* | ||
* @throws {@link RepostspaceServiceException} | ||
* <p>Base exception class for all service exceptions from Repostspace service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class BatchAddRoleCommand extends $Command | ||
.classBuilder< | ||
BatchAddRoleCommandInput, | ||
BatchAddRoleCommandOutput, | ||
RepostspaceClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep(commonParams) | ||
.m(function (this: any, Command: any, cs: any, config: RepostspaceClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("RepostSpace", "BatchAddRole", {}) | ||
.n("RepostspaceClient", "BatchAddRoleCommand") | ||
.f(void 0, void 0) | ||
.ser(se_BatchAddRoleCommand) | ||
.de(de_BatchAddRoleCommand) | ||
.build() { | ||
/** @internal type navigation helper, not in runtime. */ | ||
protected declare static __types: { | ||
api: { | ||
input: BatchAddRoleInput; | ||
output: BatchAddRoleOutput; | ||
}; | ||
sdk: { | ||
input: BatchAddRoleCommandInput; | ||
output: BatchAddRoleCommandOutput; | ||
}; | ||
}; | ||
} |
120 changes: 120 additions & 0 deletions
120
clients/client-repostspace/src/commands/BatchRemoveRoleCommand.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,120 @@ | ||
// 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 { BatchRemoveRoleInput, BatchRemoveRoleOutput } from "../models/models_0"; | ||
import { de_BatchRemoveRoleCommand, se_BatchRemoveRoleCommand } from "../protocols/Aws_restJson1"; | ||
import { RepostspaceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RepostspaceClient"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link BatchRemoveRoleCommand}. | ||
*/ | ||
export interface BatchRemoveRoleCommandInput extends BatchRemoveRoleInput {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link BatchRemoveRoleCommand}. | ||
*/ | ||
export interface BatchRemoveRoleCommandOutput extends BatchRemoveRoleOutput, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Remove role from multiple users or groups in a private re:Post.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { RepostspaceClient, BatchRemoveRoleCommand } from "@aws-sdk/client-repostspace"; // ES Modules import | ||
* // const { RepostspaceClient, BatchRemoveRoleCommand } = require("@aws-sdk/client-repostspace"); // CommonJS import | ||
* const client = new RepostspaceClient(config); | ||
* const input = { // BatchRemoveRoleInput | ||
* spaceId: "STRING_VALUE", // required | ||
* accessorIds: [ // AccessorIdList // required | ||
* "STRING_VALUE", | ||
* ], | ||
* role: "EXPERT" || "MODERATOR" || "ADMINISTRATOR" || "SUPPORTREQUESTOR", // required | ||
* }; | ||
* const command = new BatchRemoveRoleCommand(input); | ||
* const response = await client.send(command); | ||
* // { // BatchRemoveRoleOutput | ||
* // removedAccessorIds: [ // AccessorIdList // required | ||
* // "STRING_VALUE", | ||
* // ], | ||
* // errors: [ // BatchErrorList // required | ||
* // { // BatchError | ||
* // accessorId: "STRING_VALUE", // required | ||
* // error: Number("int"), // required | ||
* // message: "STRING_VALUE", // required | ||
* // }, | ||
* // ], | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param BatchRemoveRoleCommandInput - {@link BatchRemoveRoleCommandInput} | ||
* @returns {@link BatchRemoveRoleCommandOutput} | ||
* @see {@link BatchRemoveRoleCommandInput} for command's `input` shape. | ||
* @see {@link BatchRemoveRoleCommandOutput} for command's `response` shape. | ||
* @see {@link RepostspaceClientResolvedConfig | config} for RepostspaceClient's `config` shape. | ||
* | ||
* @throws {@link AccessDeniedException} (client fault) | ||
* <p>User does not have sufficient access to perform this action.</p> | ||
* | ||
* @throws {@link InternalServerException} (server fault) | ||
* <p>Unexpected error during processing of request.</p> | ||
* | ||
* @throws {@link ResourceNotFoundException} (client fault) | ||
* <p>Request references a resource which does not exist.</p> | ||
* | ||
* @throws {@link ThrottlingException} (client fault) | ||
* <p>Request was denied due to request throttling.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>The input fails to satisfy the constraints specified by an AWS service.</p> | ||
* | ||
* @throws {@link RepostspaceServiceException} | ||
* <p>Base exception class for all service exceptions from Repostspace service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class BatchRemoveRoleCommand extends $Command | ||
.classBuilder< | ||
BatchRemoveRoleCommandInput, | ||
BatchRemoveRoleCommandOutput, | ||
RepostspaceClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep(commonParams) | ||
.m(function (this: any, Command: any, cs: any, config: RepostspaceClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("RepostSpace", "BatchRemoveRole", {}) | ||
.n("RepostspaceClient", "BatchRemoveRoleCommand") | ||
.f(void 0, void 0) | ||
.ser(se_BatchRemoveRoleCommand) | ||
.de(de_BatchRemoveRoleCommand) | ||
.build() { | ||
/** @internal type navigation helper, not in runtime. */ | ||
protected declare static __types: { | ||
api: { | ||
input: BatchRemoveRoleInput; | ||
output: BatchRemoveRoleOutput; | ||
}; | ||
sdk: { | ||
input: BatchRemoveRoleCommandInput; | ||
output: BatchRemoveRoleCommandOutput; | ||
}; | ||
}; | ||
} |
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.