- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteDataSourceCommand
Deletes a data source in Amazon DataZone.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataZoneClient, DeleteDataSourceCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, DeleteDataSourceCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // DeleteDataSourceInput
domainIdentifier: "STRING_VALUE", // required
identifier: "STRING_VALUE", // required
clientToken: "STRING_VALUE",
retainPermissionsOnRevokeFailure: true || false,
};
const command = new DeleteDataSourceCommand(input);
const response = await client.send(command);
// { // DeleteDataSourceOutput
// id: "STRING_VALUE", // required
// status: "CREATING" || "FAILED_CREATION" || "READY" || "UPDATING" || "FAILED_UPDATE" || "RUNNING" || "DELETING" || "FAILED_DELETION",
// type: "STRING_VALUE",
// name: "STRING_VALUE", // required
// description: "STRING_VALUE",
// domainId: "STRING_VALUE", // required
// projectId: "STRING_VALUE", // required
// environmentId: "STRING_VALUE",
// connectionId: "STRING_VALUE",
// configuration: { // DataSourceConfigurationOutput Union: only one key present
// glueRunConfiguration: { // GlueRunConfigurationOutput
// accountId: "STRING_VALUE",
// region: "STRING_VALUE",
// dataAccessRole: "STRING_VALUE",
// relationalFilterConfigurations: [ // RelationalFilterConfigurations // required
// { // RelationalFilterConfiguration
// databaseName: "STRING_VALUE", // required
// schemaName: "STRING_VALUE",
// filterExpressions: [ // FilterExpressions
// { // FilterExpression
// type: "INCLUDE" || "EXCLUDE", // required
// expression: "STRING_VALUE", // required
// },
// ],
// },
// ],
// autoImportDataQualityResult: true || false,
// catalogName: "STRING_VALUE",
// },
// redshiftRunConfiguration: { // RedshiftRunConfigurationOutput
// accountId: "STRING_VALUE",
// region: "STRING_VALUE",
// dataAccessRole: "STRING_VALUE",
// relationalFilterConfigurations: [ // required
// {
// databaseName: "STRING_VALUE", // required
// schemaName: "STRING_VALUE",
// filterExpressions: [
// {
// type: "INCLUDE" || "EXCLUDE", // required
// expression: "STRING_VALUE", // required
// },
// ],
// },
// ],
// redshiftCredentialConfiguration: { // RedshiftCredentialConfiguration
// secretManagerArn: "STRING_VALUE", // required
// },
// redshiftStorage: { // RedshiftStorage Union: only one key present
// redshiftClusterSource: { // RedshiftClusterStorage
// clusterName: "STRING_VALUE", // required
// },
// redshiftServerlessSource: { // RedshiftServerlessStorage
// workgroupName: "STRING_VALUE", // required
// },
// },
// },
// sageMakerRunConfiguration: { // SageMakerRunConfigurationOutput
// accountId: "STRING_VALUE",
// region: "STRING_VALUE",
// trackingAssets: { // TrackingAssets // required
// "<keys>": [ // TrackingAssetArns
// "STRING_VALUE",
// ],
// },
// },
// },
// enableSetting: "ENABLED" || "DISABLED",
// publishOnImport: true || false,
// assetFormsOutput: [ // FormOutputList
// { // FormOutput
// formName: "STRING_VALUE", // required
// typeName: "STRING_VALUE",
// typeRevision: "STRING_VALUE",
// content: "STRING_VALUE",
// },
// ],
// schedule: { // ScheduleConfiguration
// timezone: "UTC" || "AFRICA_JOHANNESBURG" || "AMERICA_MONTREAL" || "AMERICA_SAO_PAULO" || "ASIA_BAHRAIN" || "ASIA_BANGKOK" || "ASIA_CALCUTTA" || "ASIA_DUBAI" || "ASIA_HONG_KONG" || "ASIA_JAKARTA" || "ASIA_KUALA_LUMPUR" || "ASIA_SEOUL" || "ASIA_SHANGHAI" || "ASIA_SINGAPORE" || "ASIA_TAIPEI" || "ASIA_TOKYO" || "AUSTRALIA_MELBOURNE" || "AUSTRALIA_SYDNEY" || "CANADA_CENTRAL" || "CET" || "CST6CDT" || "ETC_GMT" || "ETC_GMT0" || "ETC_GMT_ADD_0" || "ETC_GMT_ADD_1" || "ETC_GMT_ADD_10" || "ETC_GMT_ADD_11" || "ETC_GMT_ADD_12" || "ETC_GMT_ADD_2" || "ETC_GMT_ADD_3" || "ETC_GMT_ADD_4" || "ETC_GMT_ADD_5" || "ETC_GMT_ADD_6" || "ETC_GMT_ADD_7" || "ETC_GMT_ADD_8" || "ETC_GMT_ADD_9" || "ETC_GMT_NEG_0" || "ETC_GMT_NEG_1" || "ETC_GMT_NEG_10" || "ETC_GMT_NEG_11" || "ETC_GMT_NEG_12" || "ETC_GMT_NEG_13" || "ETC_GMT_NEG_14" || "ETC_GMT_NEG_2" || "ETC_GMT_NEG_3" || "ETC_GMT_NEG_4" || "ETC_GMT_NEG_5" || "ETC_GMT_NEG_6" || "ETC_GMT_NEG_7" || "ETC_GMT_NEG_8" || "ETC_GMT_NEG_9" || "EUROPE_DUBLIN" || "EUROPE_LONDON" || "EUROPE_PARIS" || "EUROPE_STOCKHOLM" || "EUROPE_ZURICH" || "ISRAEL" || "MEXICO_GENERAL" || "MST7MDT" || "PACIFIC_AUCKLAND" || "US_CENTRAL" || "US_EASTERN" || "US_MOUNTAIN" || "US_PACIFIC",
// schedule: "STRING_VALUE",
// },
// lastRunStatus: "REQUESTED" || "RUNNING" || "FAILED" || "PARTIALLY_SUCCEEDED" || "SUCCESS",
// lastRunAt: new Date("TIMESTAMP"),
// lastRunErrorMessage: { // DataSourceErrorMessage
// errorType: "ACCESS_DENIED_EXCEPTION" || "CONFLICT_EXCEPTION" || "INTERNAL_SERVER_EXCEPTION" || "RESOURCE_NOT_FOUND_EXCEPTION" || "SERVICE_QUOTA_EXCEEDED_EXCEPTION" || "THROTTLING_EXCEPTION" || "VALIDATION_EXCEPTION", // required
// errorDetail: "STRING_VALUE",
// },
// errorMessage: {
// errorType: "ACCESS_DENIED_EXCEPTION" || "CONFLICT_EXCEPTION" || "INTERNAL_SERVER_EXCEPTION" || "RESOURCE_NOT_FOUND_EXCEPTION" || "SERVICE_QUOTA_EXCEEDED_EXCEPTION" || "THROTTLING_EXCEPTION" || "VALIDATION_EXCEPTION", // required
// errorDetail: "STRING_VALUE",
// },
// createdAt: new Date("TIMESTAMP"),
// updatedAt: new Date("TIMESTAMP"),
// selfGrantStatus: { // SelfGrantStatusOutput Union: only one key present
// glueSelfGrantStatus: { // GlueSelfGrantStatusOutput
// selfGrantStatusDetails: [ // SelfGrantStatusDetails // required
// { // SelfGrantStatusDetail
// databaseName: "STRING_VALUE", // required
// schemaName: "STRING_VALUE",
// status: "GRANT_PENDING" || "REVOKE_PENDING" || "GRANT_IN_PROGRESS" || "REVOKE_IN_PROGRESS" || "GRANTED" || "GRANT_FAILED" || "REVOKE_FAILED", // required
// failureCause: "STRING_VALUE",
// },
// ],
// },
// redshiftSelfGrantStatus: { // RedshiftSelfGrantStatusOutput
// selfGrantStatusDetails: [ // required
// {
// databaseName: "STRING_VALUE", // required
// schemaName: "STRING_VALUE",
// status: "GRANT_PENDING" || "REVOKE_PENDING" || "GRANT_IN_PROGRESS" || "REVOKE_IN_PROGRESS" || "GRANTED" || "GRANT_FAILED" || "REVOKE_FAILED", // required
// failureCause: "STRING_VALUE",
// },
// ],
// },
// },
// retainPermissionsOnRevokeFailure: true || false,
// };
DeleteDataSourceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
domainIdentifier Required | string | undefined | The ID of the Amazon DataZone domain in which the data source is deleted. |
identifier Required | string | undefined | The identifier of the data source that is deleted. |
clientToken | string | undefined | A unique, case-sensitive identifier that is provided to ensure the idempotency of the request. |
retainPermissionsOnRevokeFailure | boolean | undefined | Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source. |
DeleteDataSourceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
domainId Required | string | undefined | The ID of the Amazon DataZone domain in which the data source is deleted. |
id Required | string | undefined | The ID of the data source that is deleted. |
name Required | string | undefined | The name of the data source that is deleted. |
projectId Required | string | undefined | The ID of the project in which this data source exists and from which it's deleted. |
assetFormsOutput | FormOutput[] | undefined | The asset data forms associated with this data source. |
configuration | DataSourceConfigurationOutput | undefined | The configuration of the data source that is deleted. |
connectionId | string | undefined | The ID of the connection that is deleted. |
createdAt | Date | undefined | The timestamp of when this data source was created. |
description | string | undefined | The description of the data source that is deleted. |
enableSetting | EnableSetting | undefined | The enable setting of the data source that specifies whether the data source is enabled or disabled. |
environmentId | string | undefined | The ID of the environemnt associated with this data source. |
errorMessage | DataSourceErrorMessage | undefined | Specifies the error message that is returned if the operation cannot be successfully completed. |
lastRunAt | Date | undefined | The timestamp of when the data source was last run. |
lastRunErrorMessage | DataSourceErrorMessage | undefined | Specifies the error message that is returned if the operation cannot be successfully completed. |
lastRunStatus | DataSourceRunStatus | undefined | The status of the last run of this data source. |
publishOnImport | boolean | undefined | Specifies whether the assets that this data source creates in the inventory are to be also automatically published to the catalog. |
retainPermissionsOnRevokeFailure | boolean | undefined | Specifies that the granted permissions are retained in case of a self-subscribe functionality failure for a data source. |
schedule | ScheduleConfiguration | undefined | The schedule of runs for this data source. |
selfGrantStatus | SelfGrantStatusOutput | undefined | Specifies the status of the self-granting functionality. |
status | DataSourceStatus | undefined | The status of this data source. |
type | string | undefined | The type of this data source. |
updatedAt | Date | undefined | The timestamp of when this data source was updated. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
ConflictException | client | There is a conflict while performing this action. |
InternalServerException | server | The request has failed because of an unknown error, exception or failure. |
ResourceNotFoundException | client | The specified resource cannot be found. |
ServiceQuotaExceededException | client | The request has exceeded the specified service quota. |
ThrottlingException | client | The request was denied due to request throttling. |
ValidationException | client | The input fails to satisfy the constraints specified by the Amazon Web Services service. |
UnauthorizedException | client | You do not have permission to perform this action. |
DataZoneServiceException | Base exception class for all service exceptions from DataZone service. |