Skip to content

Commit

Permalink
feat(client-datazone): Add new skipDeletionCheck to DeleteDomain. Add…
Browse files Browse the repository at this point in the history
… new skipDeletionCheck to DeleteProject which also automatically deletes dependent objects
  • Loading branch information
awstools committed Jan 30, 2024
1 parent b0b840a commit 4a6c458
Show file tree
Hide file tree
Showing 12 changed files with 319 additions and 59 deletions.
7 changes: 7 additions & 0 deletions clients/client-datazone/src/commands/CreateProjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // description: "STRING_VALUE",
* // projectStatus: "ACTIVE" || "DELETING" || "DELETE_FAILED",
* // failureReasons: [ // FailureReasons
* // { // ProjectDeletionError
* // code: "STRING_VALUE",
* // message: "STRING_VALUE",
* // },
* // ],
* // createdBy: "STRING_VALUE", // required
* // createdAt: new Date("TIMESTAMP"),
* // lastUpdatedAt: new Date("TIMESTAMP"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface DeleteDomainCommandOutput extends DeleteDomainOutput, __Metadat
* const input = { // DeleteDomainInput
* identifier: "STRING_VALUE", // required
* clientToken: "STRING_VALUE",
* skipDeletionCheck: true || false,
* };
* const command = new DeleteDomainCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export interface DeleteProjectCommandOutput extends DeleteProjectOutput, __Metad
* const input = { // DeleteProjectInput
* domainIdentifier: "STRING_VALUE", // required
* identifier: "STRING_VALUE", // required
* skipDeletionCheck: true || false,
* };
* const command = new DeleteProjectCommand(input);
* const response = await client.send(command);
Expand Down
7 changes: 7 additions & 0 deletions clients/client-datazone/src/commands/GetProjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ export interface GetProjectCommandOutput extends GetProjectOutput, __MetadataBea
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // description: "STRING_VALUE",
* // projectStatus: "ACTIVE" || "DELETING" || "DELETE_FAILED",
* // failureReasons: [ // FailureReasons
* // { // ProjectDeletionError
* // code: "STRING_VALUE",
* // message: "STRING_VALUE",
* // },
* // ],
* // createdBy: "STRING_VALUE", // required
* // createdAt: new Date("TIMESTAMP"),
* // lastUpdatedAt: new Date("TIMESTAMP"),
Expand Down
7 changes: 7 additions & 0 deletions clients/client-datazone/src/commands/ListProjectsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ export interface ListProjectsCommandOutput extends ListProjectsOutput, __Metadat
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // description: "STRING_VALUE",
* // projectStatus: "ACTIVE" || "DELETING" || "DELETE_FAILED",
* // failureReasons: [ // FailureReasons
* // { // ProjectDeletionError
* // code: "STRING_VALUE",
* // message: "STRING_VALUE",
* // },
* // ],
* // createdBy: "STRING_VALUE", // required
* // createdAt: new Date("TIMESTAMP"),
* // updatedAt: new Date("TIMESTAMP"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { DataZoneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataZoneClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { RejectPredictionsInput, RejectPredictionsOutput } from "../models/models_0";
import { RejectPredictionsInput } from "../models/models_0";
import { RejectPredictionsOutput } from "../models/models_1";
import { de_RejectPredictionsCommand, se_RejectPredictionsCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { DataZoneClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataZoneClient";
import { commonParams } from "../endpoint/EndpointParameters";
import { RejectSubscriptionRequestInput, RejectSubscriptionRequestInputFilterSensitiveLog } from "../models/models_0";
import { RejectSubscriptionRequestOutput, RejectSubscriptionRequestOutputFilterSensitiveLog } from "../models/models_1";
import {
RejectSubscriptionRequestInput,
RejectSubscriptionRequestInputFilterSensitiveLog,
RejectSubscriptionRequestOutput,
RejectSubscriptionRequestOutputFilterSensitiveLog,
} from "../models/models_1";
import { de_RejectSubscriptionRequestCommand, se_RejectSubscriptionRequestCommand } from "../protocols/Aws_restJson1";

/**
Expand Down
7 changes: 7 additions & 0 deletions clients/client-datazone/src/commands/UpdateProjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // description: "STRING_VALUE",
* // projectStatus: "ACTIVE" || "DELETING" || "DELETE_FAILED",
* // failureReasons: [ // FailureReasons
* // { // ProjectDeletionError
* // code: "STRING_VALUE",
* // message: "STRING_VALUE",
* // },
* // ],
* // createdBy: "STRING_VALUE", // required
* // createdAt: new Date("TIMESTAMP"),
* // lastUpdatedAt: new Date("TIMESTAMP"),
Expand Down
136 changes: 81 additions & 55 deletions clients/client-datazone/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4228,6 +4228,39 @@ export interface CreateProjectInput {
glossaryTerms?: string[];
}

/**
* @public
* Error that occurred during project deletion
*/
export interface ProjectDeletionError {
/**
* @public
* Project Deletion Error Code
*/
code?: string;

/**
* @public
* Project Deletion Error Message
*/
message?: string;
}

/**
* @public
* @enum
*/
export const ProjectStatus = {
ACTIVE: "ACTIVE",
DELETE_FAILED: "DELETE_FAILED",
DELETING: "DELETING",
} as const;

/**
* @public
*/
export type ProjectStatus = (typeof ProjectStatus)[keyof typeof ProjectStatus];

/**
* @public
*/
Expand Down Expand Up @@ -4256,6 +4289,18 @@ export interface CreateProjectOutput {
*/
description?: string;

/**
* @public
* Status of the project
*/
projectStatus?: ProjectStatus;

/**
* @public
* Reasons for failed project deletion
*/
failureReasons?: ProjectDeletionError[];

/**
* @public
* <p>The Amazon DataZone user who created the project.</p>
Expand Down Expand Up @@ -6569,6 +6614,12 @@ export interface DeleteProjectInput {
* <p>The identifier of the project that is to be deleted.</p>
*/
identifier: string | undefined;

/**
* @public
* Optional flag to asynchronously delete child entities within the project
*/
skipDeletionCheck?: boolean;
}

/**
Expand Down Expand Up @@ -6749,6 +6800,12 @@ export interface DeleteDomainInput {
* request.</p>
*/
clientToken?: string;

/**
* @public
* Optional flag to delete all child entities within the domain
*/
skipDeletionCheck?: boolean;
}

/**
Expand Down Expand Up @@ -7934,6 +7991,18 @@ export interface GetProjectOutput {
*/
description?: string;

/**
* @public
* Status of the project
*/
projectStatus?: ProjectStatus;

/**
* @public
* Reasons for failed project deletion
*/
failureReasons?: ProjectDeletionError[];

/**
* @public
* <p>The Amazon DataZone user who created the project.</p>
Expand Down Expand Up @@ -10104,6 +10173,18 @@ export interface ProjectSummary {
*/
description?: string;

/**
* @public
* Status of the project
*/
projectStatus?: ProjectStatus;

/**
* @public
* Reasons for failed project deletion
*/
failureReasons?: ProjectDeletionError[];

/**
* @public
* <p>The Amazon DataZone user who created the project.</p>
Expand Down Expand Up @@ -10950,53 +11031,6 @@ export interface RejectPredictionsInput {
clientToken?: string;
}

/**
* @public
*/
export interface RejectPredictionsOutput {
/**
* @public
* <p/>
*/
domainId: string | undefined;

/**
* @public
* <p/>
*/
assetId: string | undefined;

/**
* @public
* <p/>
*/
assetRevision: string | undefined;
}

/**
* @public
*/
export interface RejectSubscriptionRequestInput {
/**
* @public
* <p>The identifier of the Amazon DataZone domain in which the subscription request was
* rejected.</p>
*/
domainIdentifier: string | undefined;

/**
* @public
* <p>The identifier of the subscription request that was rejected.</p>
*/
identifier: string | undefined;

/**
* @public
* <p>The decision comment of the rejected subscription request.</p>
*/
decisionComment?: string;
}

/**
* @internal
*/
Expand Down Expand Up @@ -11980,11 +12014,3 @@ export const ListSubscriptionTargetsOutputFilterSensitiveLog = (obj: ListSubscri
...obj,
...(obj.items && { items: obj.items.map((item) => SubscriptionTargetSummaryFilterSensitiveLog(item)) }),
});

/**
* @internal
*/
export const RejectSubscriptionRequestInputFilterSensitiveLog = (obj: RejectSubscriptionRequestInput): any => ({
...obj,
...(obj.decisionComment && { decisionComment: SENSITIVE_STRING }),
});
69 changes: 69 additions & 0 deletions clients/client-datazone/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
Import,
ImportFilterSensitiveLog,
Model,
ProjectDeletionError,
ProjectStatus,
ProvisioningProperties,
Resource,
SortOrder,
Expand All @@ -46,6 +48,53 @@ import {
UserProfileType,
} from "./models_0";

/**
* @public
*/
export interface RejectPredictionsOutput {
/**
* @public
* <p/>
*/
domainId: string | undefined;

/**
* @public
* <p/>
*/
assetId: string | undefined;

/**
* @public
* <p/>
*/
assetRevision: string | undefined;
}

/**
* @public
*/
export interface RejectSubscriptionRequestInput {
/**
* @public
* <p>The identifier of the Amazon DataZone domain in which the subscription request was
* rejected.</p>
*/
domainIdentifier: string | undefined;

/**
* @public
* <p>The identifier of the subscription request that was rejected.</p>
*/
identifier: string | undefined;

/**
* @public
* <p>The decision comment of the rejected subscription request.</p>
*/
decisionComment?: string;
}

/**
* @public
*/
Expand Down Expand Up @@ -1502,6 +1551,18 @@ export interface UpdateProjectOutput {
*/
description?: string;

/**
* @public
* Status of the project
*/
projectStatus?: ProjectStatus;

/**
* @public
* Reasons for failed project deletion
*/
failureReasons?: ProjectDeletionError[];

/**
* @public
* <p>The Amazon DataZone user who created the project.</p>
Expand Down Expand Up @@ -2260,6 +2321,14 @@ export interface SearchTypesInput {
managed: boolean | undefined;
}

/**
* @internal
*/
export const RejectSubscriptionRequestInputFilterSensitiveLog = (obj: RejectSubscriptionRequestInput): any => ({
...obj,
...(obj.decisionComment && { decisionComment: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand Down
Loading

0 comments on commit 4a6c458

Please sign in to comment.