- 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.
UpdateDataSourceCommand
Updates the specified data source in Amazon DataZone.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataZoneClient, UpdateDataSourceCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, UpdateDataSourceCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // UpdateDataSourceInput
domainIdentifier: "STRING_VALUE", // required
identifier: "STRING_VALUE", // required
name: "STRING_VALUE",
description: "STRING_VALUE",
enableSetting: "ENABLED" || "DISABLED",
publishOnImport: true || false,
assetFormsInput: [ // FormInputList
{ // FormInput
formName: "STRING_VALUE", // required
typeIdentifier: "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",
},
configuration: { // DataSourceConfigurationInput Union: only one key present
glueRunConfiguration: { // GlueRunConfigurationInput
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: { // RedshiftRunConfigurationInput
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: { // SageMakerRunConfigurationInput
trackingAssets: { // TrackingAssets // required
"<keys>": [ // TrackingAssetArns
"STRING_VALUE",
],
},
},
},
recommendation: { // RecommendationConfiguration
enableBusinessNameGeneration: true || false,
},
retainPermissionsOnRevokeFailure: true || false,
};
const command = new UpdateDataSourceCommand(input);
const response = await client.send(command);
// { // UpdateDataSourceOutput
// 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",
// ],
// },
// },
// },
// recommendation: { // RecommendationConfiguration
// enableBusinessNameGeneration: true || false,
// },
// 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,
// };
UpdateDataSourceCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
domainIdentifier Required | string | undefined | The identifier of the domain in which to update a data source. |
identifier Required | string | undefined | The identifier of the data source to be updated. |
assetFormsInput | FormInput[] | undefined | The asset forms to be updated as part of the |
configuration | DataSourceConfigurationInput | undefined | The configuration to be updated as part of the |
description | string | undefined | The description to be updated as part of the |
enableSetting | EnableSetting | undefined | The enable setting to be updated as part of the |
name | string | undefined | The name to be updated as part of the |
publishOnImport | boolean | undefined | The publish on import setting to be updated as part of the |
recommendation | RecommendationConfiguration | undefined | The recommendation to be updated as part of the |
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 to be updated as part of the |
UpdateDataSourceCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
domainId Required | string | undefined | The identifier of the Amazon DataZone domain in which a data source is to be updated. |
id Required | string | undefined | The identifier of the data source to be updated. |
name Required | string | undefined | The name to be updated as part of the |
projectId Required | string | undefined | The identifier of the project where data source is to be updated. |
assetFormsOutput | FormOutput[] | undefined | The asset forms to be updated as part of the |
configuration | DataSourceConfigurationOutput | undefined | The configuration to be updated as part of the |
connectionId | string | undefined | The connection ID. |
createdAt | Date | undefined | The timestamp of when the data source was updated. |
description | string | undefined | The description to be updated as part of the |
enableSetting | EnableSetting | undefined | The enable setting to be updated as part of the |
environmentId | string | undefined | The identifier of the environment in which a data source is to be updated. |
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 | The last run error message of the data source. |
lastRunStatus | DataSourceRunStatus | undefined | The last run status of the data source. |
publishOnImport | boolean | undefined | The publish on import setting to be updated as part of the |
recommendation | RecommendationConfiguration | undefined | The recommendation to be updated as part of the |
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 to be updated as part of the |
selfGrantStatus | SelfGrantStatusOutput | undefined | Specifies the status of the self-granting functionality. |
status | DataSourceStatus | undefined | The status to be updated as part of the |
type | string | undefined | The type to be updated as part of the |
updatedAt | Date | undefined | The timestamp of when the 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. |