Skip to content

Commit

Permalink
feat(client-datazone): Introduces GetEnvironmentCredentials operation…
Browse files Browse the repository at this point in the history
… to SDK
  • Loading branch information
awstools committed Jul 25, 2024
1 parent 83e5411 commit 2156a87
Show file tree
Hide file tree
Showing 10 changed files with 448 additions and 106 deletions.
8 changes: 8 additions & 0 deletions clients/client-datazone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,14 @@ GetEnvironmentBlueprintConfiguration

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/datazone/command/GetEnvironmentBlueprintConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-datazone/Interface/GetEnvironmentBlueprintConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-datazone/Interface/GetEnvironmentBlueprintConfigurationCommandOutput/)

</details>
<details>
<summary>
GetEnvironmentCredentials
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/datazone/command/GetEnvironmentCredentialsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-datazone/Interface/GetEnvironmentCredentialsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-datazone/Interface/GetEnvironmentCredentialsCommandOutput/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-datazone/src/DataZone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ import {
GetEnvironmentCommandInput,
GetEnvironmentCommandOutput,
} from "./commands/GetEnvironmentCommand";
import {
GetEnvironmentCredentialsCommand,
GetEnvironmentCredentialsCommandInput,
GetEnvironmentCredentialsCommandOutput,
} from "./commands/GetEnvironmentCredentialsCommand";
import {
GetEnvironmentProfileCommand,
GetEnvironmentProfileCommandInput,
Expand Down Expand Up @@ -622,6 +627,7 @@ const commands = {
GetEnvironmentActionCommand,
GetEnvironmentBlueprintCommand,
GetEnvironmentBlueprintConfigurationCommand,
GetEnvironmentCredentialsCommand,
GetEnvironmentProfileCommand,
GetFormTypeCommand,
GetGlossaryCommand,
Expand Down Expand Up @@ -1537,6 +1543,23 @@ export interface DataZone {
cb: (err: any, data?: GetEnvironmentBlueprintConfigurationCommandOutput) => void
): void;

/**
* @see {@link GetEnvironmentCredentialsCommand}
*/
getEnvironmentCredentials(
args: GetEnvironmentCredentialsCommandInput,
options?: __HttpHandlerOptions
): Promise<GetEnvironmentCredentialsCommandOutput>;
getEnvironmentCredentials(
args: GetEnvironmentCredentialsCommandInput,
cb: (err: any, data?: GetEnvironmentCredentialsCommandOutput) => void
): void;
getEnvironmentCredentials(
args: GetEnvironmentCredentialsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetEnvironmentCredentialsCommandOutput) => void
): void;

/**
* @see {@link GetEnvironmentProfileCommand}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-datazone/src/DataZoneClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ import {
GetEnvironmentBlueprintConfigurationCommandOutput,
} from "./commands/GetEnvironmentBlueprintConfigurationCommand";
import { GetEnvironmentCommandInput, GetEnvironmentCommandOutput } from "./commands/GetEnvironmentCommand";
import {
GetEnvironmentCredentialsCommandInput,
GetEnvironmentCredentialsCommandOutput,
} from "./commands/GetEnvironmentCredentialsCommand";
import {
GetEnvironmentProfileCommandInput,
GetEnvironmentProfileCommandOutput,
Expand Down Expand Up @@ -404,6 +408,7 @@ export type ServiceInputTypes =
| GetEnvironmentBlueprintCommandInput
| GetEnvironmentBlueprintConfigurationCommandInput
| GetEnvironmentCommandInput
| GetEnvironmentCredentialsCommandInput
| GetEnvironmentProfileCommandInput
| GetFormTypeCommandInput
| GetGlossaryCommandInput
Expand Down Expand Up @@ -531,6 +536,7 @@ export type ServiceOutputTypes =
| GetEnvironmentBlueprintCommandOutput
| GetEnvironmentBlueprintConfigurationCommandOutput
| GetEnvironmentCommandOutput
| GetEnvironmentCredentialsCommandOutput
| GetEnvironmentProfileCommandOutput
| GetFormTypeCommandOutput
| GetGlossaryCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
// 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 { DataZoneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataZoneClient";
import { commonParams } from "../endpoint/EndpointParameters";
import {
GetEnvironmentCredentialsInput,
GetEnvironmentCredentialsOutput,
GetEnvironmentCredentialsOutputFilterSensitiveLog,
} from "../models/models_0";
import { de_GetEnvironmentCredentialsCommand, se_GetEnvironmentCredentialsCommand } from "../protocols/Aws_restJson1";

/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link GetEnvironmentCredentialsCommand}.
*/
export interface GetEnvironmentCredentialsCommandInput extends GetEnvironmentCredentialsInput {}
/**
* @public
*
* The output of {@link GetEnvironmentCredentialsCommand}.
*/
export interface GetEnvironmentCredentialsCommandOutput extends GetEnvironmentCredentialsOutput, __MetadataBearer {}

/**
* <p>Gets the credentials of an environment in Amazon DataZone.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { DataZoneClient, GetEnvironmentCredentialsCommand } from "@aws-sdk/client-datazone"; // ES Modules import
* // const { DataZoneClient, GetEnvironmentCredentialsCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
* const client = new DataZoneClient(config);
* const input = { // GetEnvironmentCredentialsInput
* domainIdentifier: "STRING_VALUE", // required
* environmentIdentifier: "STRING_VALUE", // required
* };
* const command = new GetEnvironmentCredentialsCommand(input);
* const response = await client.send(command);
* // { // GetEnvironmentCredentialsOutput
* // accessKeyId: "STRING_VALUE",
* // secretAccessKey: "STRING_VALUE",
* // sessionToken: "STRING_VALUE",
* // expiration: new Date("TIMESTAMP"),
* // };
*
* ```
*
* @param GetEnvironmentCredentialsCommandInput - {@link GetEnvironmentCredentialsCommandInput}
* @returns {@link GetEnvironmentCredentialsCommandOutput}
* @see {@link GetEnvironmentCredentialsCommandInput} for command's `input` shape.
* @see {@link GetEnvironmentCredentialsCommandOutput} for command's `response` shape.
* @see {@link DataZoneClientResolvedConfig | config} for DataZoneClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p>You do not have sufficient access to perform this action.</p>
*
* @throws {@link InternalServerException} (server fault)
* <p>The request has failed because of an unknown error, exception or failure.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource cannot be found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>The request was denied due to request throttling.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
*
* @throws {@link UnauthorizedException} (client fault)
* <p>You do not have permission to perform this action.</p>
*
* @throws {@link DataZoneServiceException}
* <p>Base exception class for all service exceptions from DataZone service.</p>
*
* @public
*/
export class GetEnvironmentCredentialsCommand extends $Command
.classBuilder<
GetEnvironmentCredentialsCommandInput,
GetEnvironmentCredentialsCommandOutput,
DataZoneClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: DataZoneClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("DataZone", "GetEnvironmentCredentials", {})
.n("DataZoneClient", "GetEnvironmentCredentialsCommand")
.f(void 0, GetEnvironmentCredentialsOutputFilterSensitiveLog)
.ser(se_GetEnvironmentCredentialsCommand)
.de(de_GetEnvironmentCredentialsCommand)
.build() {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { DataZoneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataZoneClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { ListEnvironmentBlueprintsInput } from "../models/models_0";
import { ListEnvironmentBlueprintsOutput, ListEnvironmentBlueprintsOutputFilterSensitiveLog } from "../models/models_1";
import {
ListEnvironmentBlueprintsInput,
ListEnvironmentBlueprintsOutput,
ListEnvironmentBlueprintsOutputFilterSensitiveLog,
} from "../models/models_1";
import { de_ListEnvironmentBlueprintsCommand, se_ListEnvironmentBlueprintsCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
1 change: 1 addition & 0 deletions clients/client-datazone/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export * from "./GetEnvironmentActionCommand";
export * from "./GetEnvironmentBlueprintCommand";
export * from "./GetEnvironmentBlueprintConfigurationCommand";
export * from "./GetEnvironmentCommand";
export * from "./GetEnvironmentCredentialsCommand";
export * from "./GetEnvironmentProfileCommand";
export * from "./GetFormTypeCommand";
export * from "./GetGlossaryCommand";
Expand Down
155 changes: 54 additions & 101 deletions clients/client-datazone/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9078,6 +9078,53 @@ export interface GetEnvironmentBlueprintOutput {
updatedAt?: Date;
}

/**
* @public
*/
export interface GetEnvironmentCredentialsInput {
/**
* <p>The ID of the Amazon DataZone domain in which this environment and its credentials
* exist.</p>
* @public
*/
domainIdentifier: string | undefined;

/**
* <p>The ID of the environment whose credentials this operation gets.</p>
* @public
*/
environmentIdentifier: string | undefined;
}

/**
* @public
*/
export interface GetEnvironmentCredentialsOutput {
/**
* <p>The access key ID of the environment.</p>
* @public
*/
accessKeyId?: string;

/**
* <p>The secret access key of the environment credentials.</p>
* @public
*/
secretAccessKey?: string;

/**
* <p>The session token of the environment credentials.</p>
* @public
*/
sessionToken?: string;

/**
* <p>The expiration timestamp of the environment credentials.</p>
* @public
*/
expiration?: Date;
}

/**
* @public
*/
Expand Down Expand Up @@ -10747,98 +10794,6 @@ export interface ListEnvironmentActionsOutput {
nextToken?: string;
}

/**
* @public
*/
export interface ListEnvironmentBlueprintsInput {
/**
* <p>The identifier of the Amazon DataZone domain.</p>
* @public
*/
domainIdentifier: string | undefined;

/**
* <p>The maximum number of blueprints to return in a single call to
* <code>ListEnvironmentBlueprints</code>. When the number of blueprints to be listed is
* greater than the value of <code>MaxResults</code>, the response contains a
* <code>NextToken</code> value that you can use in a subsequent call to
* <code>ListEnvironmentBlueprints</code> to list the next set of blueprints.</p>
* @public
*/
maxResults?: number;

/**
* <p>When the number of blueprints in the environment is greater than the default value for
* the <code>MaxResults</code> parameter, or if you explicitly specify a value for
* <code>MaxResults</code> that is less than the number of blueprints in the environment,
* the response includes a pagination token named <code>NextToken</code>. You can specify this
* <code>NextToken</code> value in a subsequent call to
* <code>ListEnvironmentBlueprints</code>to list the next set of blueprints.</p>
* @public
*/
nextToken?: string;

/**
* <p>The name of the Amazon DataZone environment.</p>
* @public
*/
name?: string;

/**
* <p>Specifies whether the environment blueprint is managed by Amazon DataZone.</p>
* @public
*/
managed?: boolean;
}

/**
* <p>The details of an environment blueprint summary.</p>
* @public
*/
export interface EnvironmentBlueprintSummary {
/**
* <p>The identifier of the blueprint.</p>
* @public
*/
id: string | undefined;

/**
* <p>The name of the blueprint.</p>
* @public
*/
name: string | undefined;

/**
* <p>The description of a blueprint.</p>
* @public
*/
description?: string;

/**
* <p>The provider of the blueprint.</p>
* @public
*/
provider: string | undefined;

/**
* <p>The provisioning properties of the blueprint.</p>
* @public
*/
provisioningProperties: ProvisioningProperties | undefined;

/**
* <p>The timestamp of when an environment blueprint was created.</p>
* @public
*/
createdAt?: Date;

/**
* <p>The timestamp of when the blueprint was enabled.</p>
* @public
*/
updatedAt?: Date;
}

/**
* @internal
*/
Expand Down Expand Up @@ -11525,6 +11480,13 @@ export const GetEnvironmentBlueprintOutputFilterSensitiveLog = (obj: GetEnvironm
}),
});

/**
* @internal
*/
export const GetEnvironmentCredentialsOutputFilterSensitiveLog = (obj: GetEnvironmentCredentialsOutput): any => ({
...obj,
});

/**
* @internal
*/
Expand Down Expand Up @@ -11678,12 +11640,3 @@ export const ListDataSourceRunActivitiesOutputFilterSensitiveLog = (obj: ListDat
...obj,
...(obj.items && { items: obj.items.map((item) => DataSourceRunActivityFilterSensitiveLog(item)) }),
});

/**
* @internal
*/
export const EnvironmentBlueprintSummaryFilterSensitiveLog = (obj: EnvironmentBlueprintSummary): any => ({
...obj,
...(obj.description && { description: SENSITIVE_STRING }),
...(obj.provisioningProperties && { provisioningProperties: obj.provisioningProperties }),
});
Loading

0 comments on commit 2156a87

Please sign in to comment.