Skip to content

Commit 089a6f1

Browse files
author
awstools
committed
feat(client-datazone): Added api for deleting data export configuration for a domain
1 parent 784b9f3 commit 089a6f1

13 files changed

Lines changed: 281 additions & 27 deletions

File tree

clients/client-datazone/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,13 @@ DeleteConnection
502502
</details>
503503
<details>
504504
<summary>
505+
DeleteDataExportConfiguration
506+
</summary>
507+
508+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/datazone/command/DeleteDataExportConfigurationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-datazone/Interface/DeleteDataExportConfigurationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-datazone/Interface/DeleteDataExportConfigurationCommandOutput/)
509+
</details>
510+
<details>
511+
<summary>
505512
DeleteDataProduct
506513
</summary>
507514

clients/client-datazone/src/DataZone.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ import {
205205
DeleteConnectionCommandInput,
206206
DeleteConnectionCommandOutput,
207207
} from "./commands/DeleteConnectionCommand";
208+
import {
209+
DeleteDataExportConfigurationCommand,
210+
DeleteDataExportConfigurationCommandInput,
211+
DeleteDataExportConfigurationCommandOutput,
212+
} from "./commands/DeleteDataExportConfigurationCommand";
208213
import {
209214
DeleteDataProductCommand,
210215
DeleteDataProductCommandInput,
@@ -842,6 +847,7 @@ const commands = {
842847
DeleteAssetFilterCommand,
843848
DeleteAssetTypeCommand,
844849
DeleteConnectionCommand,
850+
DeleteDataExportConfigurationCommand,
845851
DeleteDataProductCommand,
846852
DeleteDataSourceCommand,
847853
DeleteDomainCommand,
@@ -1707,6 +1713,23 @@ export interface DataZone {
17071713
cb: (err: any, data?: DeleteConnectionCommandOutput) => void
17081714
): void;
17091715

1716+
/**
1717+
* @see {@link DeleteDataExportConfigurationCommand}
1718+
*/
1719+
deleteDataExportConfiguration(
1720+
args: DeleteDataExportConfigurationCommandInput,
1721+
options?: __HttpHandlerOptions
1722+
): Promise<DeleteDataExportConfigurationCommandOutput>;
1723+
deleteDataExportConfiguration(
1724+
args: DeleteDataExportConfigurationCommandInput,
1725+
cb: (err: any, data?: DeleteDataExportConfigurationCommandOutput) => void
1726+
): void;
1727+
deleteDataExportConfiguration(
1728+
args: DeleteDataExportConfigurationCommandInput,
1729+
options: __HttpHandlerOptions,
1730+
cb: (err: any, data?: DeleteDataExportConfigurationCommandOutput) => void
1731+
): void;
1732+
17101733
/**
17111734
* @see {@link DeleteDataProductCommand}
17121735
*/

clients/client-datazone/src/DataZoneClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ import { DeleteAssetCommandInput, DeleteAssetCommandOutput } from "./commands/De
157157
import { DeleteAssetFilterCommandInput, DeleteAssetFilterCommandOutput } from "./commands/DeleteAssetFilterCommand";
158158
import { DeleteAssetTypeCommandInput, DeleteAssetTypeCommandOutput } from "./commands/DeleteAssetTypeCommand";
159159
import { DeleteConnectionCommandInput, DeleteConnectionCommandOutput } from "./commands/DeleteConnectionCommand";
160+
import {
161+
DeleteDataExportConfigurationCommandInput,
162+
DeleteDataExportConfigurationCommandOutput,
163+
} from "./commands/DeleteDataExportConfigurationCommand";
160164
import { DeleteDataProductCommandInput, DeleteDataProductCommandOutput } from "./commands/DeleteDataProductCommand";
161165
import { DeleteDataSourceCommandInput, DeleteDataSourceCommandOutput } from "./commands/DeleteDataSourceCommand";
162166
import { DeleteDomainCommandInput, DeleteDomainCommandOutput } from "./commands/DeleteDomainCommand";
@@ -511,6 +515,7 @@ export type ServiceInputTypes =
511515
| DeleteAssetFilterCommandInput
512516
| DeleteAssetTypeCommandInput
513517
| DeleteConnectionCommandInput
518+
| DeleteDataExportConfigurationCommandInput
514519
| DeleteDataProductCommandInput
515520
| DeleteDataSourceCommandInput
516521
| DeleteDomainCommandInput
@@ -690,6 +695,7 @@ export type ServiceOutputTypes =
690695
| DeleteAssetFilterCommandOutput
691696
| DeleteAssetTypeCommandOutput
692697
| DeleteConnectionCommandOutput
698+
| DeleteDataExportConfigurationCommandOutput
693699
| DeleteDataProductCommandOutput
694700
| DeleteDataSourceCommandOutput
695701
| DeleteDomainCommandOutput
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { Command as $Command } from "@smithy/smithy-client";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
5+
6+
import type { DataZoneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataZoneClient";
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import type { DeleteDataExportConfigurationInput, DeleteDataExportConfigurationOutput } from "../models/models_1";
9+
import { DeleteDataExportConfiguration$ } from "../schemas/schemas_0";
10+
11+
/**
12+
* @public
13+
*/
14+
export type { __MetadataBearer };
15+
export { $Command };
16+
/**
17+
* @public
18+
*
19+
* The input for {@link DeleteDataExportConfigurationCommand}.
20+
*/
21+
export interface DeleteDataExportConfigurationCommandInput extends DeleteDataExportConfigurationInput {}
22+
/**
23+
* @public
24+
*
25+
* The output of {@link DeleteDataExportConfigurationCommand}.
26+
*/
27+
export interface DeleteDataExportConfigurationCommandOutput extends DeleteDataExportConfigurationOutput, __MetadataBearer {}
28+
29+
/**
30+
* <p>Deletes data export configuration for a domain.</p> <p>This operation does not delete the S3 table created by the PutDataExportConfiguration operation.</p> <p>To temporarily disable export without deleting the configuration, use the PutDataExportConfiguration operation with the <code>--no-enable-export</code> flag instead. This allows you to re-enable export for the same domain using the <code>--enable-export</code> flag without deleting S3 table.</p>
31+
* @example
32+
* Use a bare-bones client and the command you need to make an API call.
33+
* ```javascript
34+
* import { DataZoneClient, DeleteDataExportConfigurationCommand } from "@aws-sdk/client-datazone"; // ES Modules import
35+
* // const { DataZoneClient, DeleteDataExportConfigurationCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
36+
* // import type { DataZoneClientConfig } from "@aws-sdk/client-datazone";
37+
* const config = {}; // type is DataZoneClientConfig
38+
* const client = new DataZoneClient(config);
39+
* const input = { // DeleteDataExportConfigurationInput
40+
* domainIdentifier: "STRING_VALUE", // required
41+
* };
42+
* const command = new DeleteDataExportConfigurationCommand(input);
43+
* const response = await client.send(command);
44+
* // {};
45+
*
46+
* ```
47+
*
48+
* @param DeleteDataExportConfigurationCommandInput - {@link DeleteDataExportConfigurationCommandInput}
49+
* @returns {@link DeleteDataExportConfigurationCommandOutput}
50+
* @see {@link DeleteDataExportConfigurationCommandInput} for command's `input` shape.
51+
* @see {@link DeleteDataExportConfigurationCommandOutput} for command's `response` shape.
52+
* @see {@link DataZoneClientResolvedConfig | config} for DataZoneClient's `config` shape.
53+
*
54+
* @throws {@link AccessDeniedException} (client fault)
55+
* <p>You do not have sufficient access to perform this action.</p>
56+
*
57+
* @throws {@link ConflictException} (client fault)
58+
* <p>There is a conflict while performing this action.</p>
59+
*
60+
* @throws {@link InternalServerException} (server fault)
61+
* <p>The request has failed because of an unknown error, exception or failure.</p>
62+
*
63+
* @throws {@link ResourceNotFoundException} (client fault)
64+
* <p>The specified resource cannot be found.</p>
65+
*
66+
* @throws {@link ThrottlingException} (client fault)
67+
* <p>The request was denied due to request throttling.</p>
68+
*
69+
* @throws {@link ValidationException} (client fault)
70+
* <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
71+
*
72+
* @throws {@link UnauthorizedException} (client fault)
73+
* <p>You do not have permission to perform this action.</p>
74+
*
75+
* @throws {@link DataZoneServiceException}
76+
* <p>Base exception class for all service exceptions from DataZone service.</p>
77+
*
78+
*
79+
* @public
80+
*/
81+
export class DeleteDataExportConfigurationCommand extends $Command
82+
.classBuilder<
83+
DeleteDataExportConfigurationCommandInput,
84+
DeleteDataExportConfigurationCommandOutput,
85+
DataZoneClientResolvedConfig,
86+
ServiceInputTypes,
87+
ServiceOutputTypes
88+
>()
89+
.ep(commonParams)
90+
.m(function (this: any, Command: any, cs: any, config: DataZoneClientResolvedConfig, o: any) {
91+
return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
92+
})
93+
.s("DataZone", "DeleteDataExportConfiguration", {})
94+
.n("DataZoneClient", "DeleteDataExportConfigurationCommand")
95+
.sc(DeleteDataExportConfiguration$)
96+
.build() {
97+
/** @internal type navigation helper, not in runtime. */
98+
protected declare static __types: {
99+
api: {
100+
input: DeleteDataExportConfigurationInput;
101+
output: {};
102+
};
103+
sdk: {
104+
input: DeleteDataExportConfigurationCommandInput;
105+
output: DeleteDataExportConfigurationCommandOutput;
106+
};
107+
};
108+
}

clients/client-datazone/src/commands/PutDataExportConfigurationCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface PutDataExportConfigurationCommandInput extends PutDataExportCon
2727
export interface PutDataExportConfigurationCommandOutput extends PutDataExportConfigurationOutput, __MetadataBearer {}
2828

2929
/**
30-
* <p>Creates data export configuration details.</p> <p>In the current release, you can enable exporting asset metadata only for one domain per Amazon Web Services account per region. If you disable exporting asset metadata feature for a domain where it's already enabled, you cannot enable this feature for another domain in the same Amazon Web Services account and region.</p>
30+
* <p>Creates data export configuration details.</p> <p>If you want to temporarily disable export and later re-enable it for the same domain, use the <code>--no-enable-export</code> flag to disable and the <code>--enable-export</code> flag to re-enable. This preserves the configuration and allows you to re-enable export without deleting S3 table.</p> <note> <p>You can enable asset metadata export for only one domain per account per Region. To enable export for a different domain, complete the following steps:</p> <ol> <li> <p>Delete the export configuration for the currently enabled domain using the DeleteDataExportConfiguration operation.</p> </li> <li> <p>Delete the asset S3 table under the aws-sagemaker-catalog S3 table bucket. We recommend backing up the S3 table before deletion.</p> </li> <li> <p>Call the PutDataExportConfiguration API to enable export for the new domain.</p> </li> </ol> </note>
3131
* @example
3232
* Use a bare-bones client and the command you need to make an API call.
3333
* ```javascript

clients/client-datazone/src/commands/TagResourceCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

66
import type { DataZoneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataZoneClient";
77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import type { TagResourceRequest, TagResourceResponse } from "../models/models_1";
8+
import type { TagResourceRequest, TagResourceResponse } from "../models/models_2";
99
import { TagResource$ } from "../schemas/schemas_0";
1010

1111
/**

clients/client-datazone/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export * from "./DeleteAssetCommand";
4242
export * from "./DeleteAssetFilterCommand";
4343
export * from "./DeleteAssetTypeCommand";
4444
export * from "./DeleteConnectionCommand";
45+
export * from "./DeleteDataExportConfigurationCommand";
4546
export * from "./DeleteDataProductCommand";
4647
export * from "./DeleteDataSourceCommand";
4748
export * from "./DeleteDomainCommand";

clients/client-datazone/src/models/models_1.ts

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,6 +1937,22 @@ export interface DeleteConnectionOutput {
19371937
status?: string | undefined;
19381938
}
19391939

1940+
/**
1941+
* @public
1942+
*/
1943+
export interface DeleteDataExportConfigurationInput {
1944+
/**
1945+
* <p>The domain ID for which you want to delete the data export configuration.</p>
1946+
* @public
1947+
*/
1948+
domainIdentifier: string | undefined;
1949+
}
1950+
1951+
/**
1952+
* @public
1953+
*/
1954+
export interface DeleteDataExportConfigurationOutput {}
1955+
19401956
/**
19411957
* @public
19421958
*/
@@ -9557,7 +9573,7 @@ export interface PostTimeSeriesDataPointsOutput {
95579573
*/
95589574
export interface PutDataExportConfigurationInput {
95599575
/**
9560-
* <p>The domain ID where you want to create data export configuration details.</p>
9576+
* <p>The domain ID for which you want to create data export configuration details.</p>
95619577
* @public
95629578
*/
95639579
domainIdentifier: string | undefined;
@@ -11245,25 +11261,3 @@ export interface SearchUserProfilesOutput {
1124511261
*/
1124611262
nextToken?: string | undefined;
1124711263
}
11248-
11249-
/**
11250-
* @public
11251-
*/
11252-
export interface TagResourceRequest {
11253-
/**
11254-
* <p>The ARN of the resource to be tagged in Amazon DataZone.</p>
11255-
* @public
11256-
*/
11257-
resourceArn: string | undefined;
11258-
11259-
/**
11260-
* <p>Specifies the tags for the <code>TagResource</code> action.</p>
11261-
* @public
11262-
*/
11263-
tags: Record<string, string> | undefined;
11264-
}
11265-
11266-
/**
11267-
* @public
11268-
*/
11269-
export interface TagResourceResponse {}

clients/client-datazone/src/models/models_2.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,28 @@ import {
5252
} from "./models_0";
5353
import { type SearchSort, Filter, SearchInItem } from "./models_1";
5454

55+
/**
56+
* @public
57+
*/
58+
export interface TagResourceRequest {
59+
/**
60+
* <p>The ARN of the resource to be tagged in Amazon DataZone.</p>
61+
* @public
62+
*/
63+
resourceArn: string | undefined;
64+
65+
/**
66+
* <p>Specifies the tags for the <code>TagResource</code> action.</p>
67+
* @public
68+
*/
69+
tags: Record<string, string> | undefined;
70+
}
71+
72+
/**
73+
* @public
74+
*/
75+
export interface TagResourceResponse {}
76+
5577
/**
5678
* @public
5779
*/

clients/client-datazone/src/schemas/schemas_0.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ const _DCI = "DeleteConnectionInput";
223223
const _DCO = "DeleteConnectionOutput";
224224
const _DCe = "DeleteConnection";
225225
const _DD = "DomainDescription";
226+
const _DDEC = "DeleteDataExportConfiguration";
227+
const _DDECI = "DeleteDataExportConfigurationInput";
228+
const _DDECO = "DeleteDataExportConfigurationOutput";
226229
const _DDI = "DeleteDomainInput";
227230
const _DDO = "DeleteDomainOutput";
228231
const _DDP = "DeleteDataProduct";
@@ -2447,6 +2450,16 @@ export var DeleteConnectionOutput$: StaticStructureSchema = [3, n0, _DCO,
24472450
[_s],
24482451
[0]
24492452
];
2453+
export var DeleteDataExportConfigurationInput$: StaticStructureSchema = [3, n0, _DDECI,
2454+
0,
2455+
[_dI],
2456+
[[0, 1]], 1
2457+
];
2458+
export var DeleteDataExportConfigurationOutput$: StaticStructureSchema = [3, n0, _DDECO,
2459+
0,
2460+
[],
2461+
[]
2462+
];
24502463
export var DeleteDataProductInput$: StaticStructureSchema = [3, n0, _DDPI,
24512464
0,
24522465
[_dI, _i],
@@ -5440,6 +5453,9 @@ export var DeleteAssetType$: StaticOperationSchema = [9, n0, _DAT,
54405453
export var DeleteConnection$: StaticOperationSchema = [9, n0, _DCe,
54415454
{ [_ht]: ["DELETE", "/v2/domains/{domainIdentifier}/connections/{identifier}", 202] }, () => DeleteConnectionInput$, () => DeleteConnectionOutput$
54425455
];
5456+
export var DeleteDataExportConfiguration$: StaticOperationSchema = [9, n0, _DDEC,
5457+
{ [_ht]: ["DELETE", "/v2/domains/{domainIdentifier}/data-export-configuration", 204] }, () => DeleteDataExportConfigurationInput$, () => DeleteDataExportConfigurationOutput$
5458+
];
54435459
export var DeleteDataProduct$: StaticOperationSchema = [9, n0, _DDP,
54445460
{ [_ht]: ["DELETE", "/v2/domains/{domainIdentifier}/data-products/{identifier}", 204] }, () => DeleteDataProductInput$, () => DeleteDataProductOutput$
54455461
];

0 commit comments

Comments
 (0)