Skip to content

Commit

Permalink
feat(client-redshift): Introduces new field 'LoadSampleData' in Creat…
Browse files Browse the repository at this point in the history
…eCluster operation. Customers can now specify 'LoadSampleData' option during creation of a cluster, which results in loading of sample data in the cluster that is created.
  • Loading branch information
awstools committed May 6, 2022
1 parent 6c6525c commit 9b91388
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 26 deletions.
12 changes: 6 additions & 6 deletions clients/client-redshift/src/Redshift.ts
Original file line number Diff line number Diff line change
Expand Up @@ -751,8 +751,8 @@ export class Redshift extends RedshiftClient {

/**
* <p>From a data producer account, authorizes the sharing of a datashare with one or more
* consumer accounts or managing entities. To authorize a datashare for a data consumer, the producer account
* must have the correct access privileges.</p>
* consumer accounts or managing entities. To authorize a datashare for a data consumer,
* the producer account must have the correct access permissions.</p>
*/
public authorizeDataShare(
args: AuthorizeDataShareCommandInput,
Expand Down Expand Up @@ -1536,7 +1536,7 @@ export class Redshift extends RedshiftClient {
}

/**
* <p>From the producer account, removes authorization from the specified datashare. </p>
* <p>From a datashare producer account, removes authorization from the specified datashare. </p>
*/
public deauthorizeDataShare(
args: DeauthorizeDataShareCommandInput,
Expand Down Expand Up @@ -3559,7 +3559,7 @@ export class Redshift extends RedshiftClient {
}

/**
* <p>From a consumer account, remove association for the specified datashare.
* <p>From a datashare consumer account, remove association for the specified datashare.
* </p>
*/
public disassociateDataShareConsumer(
Expand Down Expand Up @@ -3676,7 +3676,7 @@ export class Redshift extends RedshiftClient {
* <code>dbgroups</code>. </p>
* <p>In addition, if the <code>AutoCreate</code> parameter is set to <code>True</code>,
* then the policy must include the <code>redshift:CreateClusterUser</code>
* privilege.</p>
* permission.</p>
* <p>If the <code>DbName</code> parameter is specified, the IAM policy must allow access
* to the resource <code>dbname</code> for the specified database name. </p>
*/
Expand Down Expand Up @@ -4427,7 +4427,7 @@ export class Redshift extends RedshiftClient {
}

/**
* <p>From the consumer account, rejects the specified datashare.</p>
* <p>From a datashare consumer account, rejects the specified datashare.</p>
*/
public rejectDataShare(
args: RejectDataShareCommandInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export interface AuthorizeDataShareCommandOutput extends DataShare, __MetadataBe

/**
* <p>From a data producer account, authorizes the sharing of a datashare with one or more
* consumer accounts or managing entities. To authorize a datashare for a data consumer, the producer account
* must have the correct access privileges.</p>
* consumer accounts or managing entities. To authorize a datashare for a data consumer,
* the producer account must have the correct access permissions.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface DeauthorizeDataShareCommandInput extends DeauthorizeDataShareMe
export interface DeauthorizeDataShareCommandOutput extends DataShare, __MetadataBearer {}

/**
* <p>From the producer account, removes authorization from the specified datashare. </p>
* <p>From a datashare producer account, removes authorization from the specified datashare. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface DisassociateDataShareConsumerCommandInput extends DisassociateD
export interface DisassociateDataShareConsumerCommandOutput extends DataShare, __MetadataBearer {}

/**
* <p>From a consumer account, remove association for the specified datashare.
* <p>From a datashare consumer account, remove association for the specified datashare.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export interface GetClusterCredentialsCommandOutput extends ClusterCredentials,
* <code>dbgroups</code>. </p>
* <p>In addition, if the <code>AutoCreate</code> parameter is set to <code>True</code>,
* then the policy must include the <code>redshift:CreateClusterUser</code>
* privilege.</p>
* permission.</p>
* <p>If the <code>DbName</code> parameter is specified, the IAM policy must allow access
* to the resource <code>dbname</code> for the specified database name. </p>
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface RejectDataShareCommandInput extends RejectDataShareMessage {}
export interface RejectDataShareCommandOutput extends DataShare, __MetadataBearer {}

/**
* <p>From the consumer account, rejects the specified datashare.</p>
* <p>From a datashare consumer account, rejects the specified datashare.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
20 changes: 13 additions & 7 deletions clients/client-redshift/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,8 @@ export interface DataShare {
AllowPubliclyAccessibleConsumers?: boolean;

/**
* <p>A value that specifies when the datashare has an association between a producer and data consumers.</p>
* <p>A value that specifies when the datashare has an association between producer and data
* consumers.</p>
*/
DataShareAssociations?: DataShareAssociation[];

Expand Down Expand Up @@ -3308,12 +3309,12 @@ export class ClusterAlreadyExistsFault extends __BaseException {
*/
export interface ClusterCredentials {
/**
* <p>A database user name that is authorized to log on to the database
* <code>DbName</code> using the password <code>DbPassword</code>. If the specified
* DbUser exists in the database, the new user name has the same database privileges as the
* the user named in DbUser. By default, the user is added to PUBLIC. If the
* <code>DbGroups</code> parameter is specifed, <code>DbUser</code> is added to the
* listed groups for any sessions created using these credentials.</p>
* <p>A database user name that is authorized to log on to the database <code>DbName</code>
* using the password <code>DbPassword</code>. If the specified DbUser exists in the
* database, the new user name has the same database permissions as the the user named in
* DbUser. By default, the user is added to PUBLIC. If the <code>DbGroups</code> parameter
* is specifed, <code>DbUser</code> is added to the listed groups for any sessions created
* using these credentials.</p>
*/
DbUser?: string;

Expand Down Expand Up @@ -4654,6 +4655,11 @@ export interface CreateClusterMessage {
* <p>The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created. </p>
*/
DefaultIamRoleArn?: string;

/**
* <p>A flag that specifies whether to load sample data once the cluster is created.</p>
*/
LoadSampleData?: string;
}

export namespace CreateClusterMessage {
Expand Down
3 changes: 3 additions & 0 deletions clients/client-redshift/src/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10736,6 +10736,9 @@ const serializeAws_queryCreateClusterMessage = (input: CreateClusterMessage, con
if (input.DefaultIamRoleArn !== undefined && input.DefaultIamRoleArn !== null) {
entries["DefaultIamRoleArn"] = input.DefaultIamRoleArn;
}
if (input.LoadSampleData !== undefined && input.LoadSampleData !== null) {
entries["LoadSampleData"] = input.LoadSampleData;
}
return entries;
};

Expand Down
20 changes: 13 additions & 7 deletions codegen/sdk-codegen/aws-models/redshift.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>From a data producer account, authorizes the sharing of a datashare with one or more\n consumer accounts or managing entities. To authorize a datashare for a data consumer, the producer account\n must have the correct access privileges.</p>"
"smithy.api#documentation": "<p>From a data producer account, authorizes the sharing of a datashare with one or more\n consumer accounts or managing entities. To authorize a datashare for a data consumer,\n the producer account must have the correct access permissions.</p>"
}
},
"com.amazonaws.redshift#AuthorizeDataShareMessage": {
Expand Down Expand Up @@ -1383,7 +1383,7 @@
"DbUser": {
"target": "com.amazonaws.redshift#String",
"traits": {
"smithy.api#documentation": "<p>A database user name that is authorized to log on to the database\n <code>DbName</code> using the password <code>DbPassword</code>. If the specified\n DbUser exists in the database, the new user name has the same database privileges as the\n the user named in DbUser. By default, the user is added to PUBLIC. If the\n <code>DbGroups</code> parameter is specifed, <code>DbUser</code> is added to the\n listed groups for any sessions created using these credentials.</p>"
"smithy.api#documentation": "<p>A database user name that is authorized to log on to the database <code>DbName</code>\n using the password <code>DbPassword</code>. If the specified DbUser exists in the\n database, the new user name has the same database permissions as the the user named in\n DbUser. By default, the user is added to PUBLIC. If the <code>DbGroups</code> parameter\n is specifed, <code>DbUser</code> is added to the listed groups for any sessions created\n using these credentials.</p>"
}
},
"DbPassword": {
Expand Down Expand Up @@ -2678,6 +2678,12 @@
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was created. </p>"
}
},
"LoadSampleData": {
"target": "com.amazonaws.redshift#String",
"traits": {
"smithy.api#documentation": "<p>A flag that specifies whether to load sample data once the cluster is created.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -3724,7 +3730,7 @@
"DataShareAssociations": {
"target": "com.amazonaws.redshift#DataShareAssociationList",
"traits": {
"smithy.api#documentation": "<p>A value that specifies when the datashare has an association between a producer and data consumers.</p>"
"smithy.api#documentation": "<p>A value that specifies when the datashare has an association between producer and data\n consumers.</p>"
}
},
"ManagedBy": {
Expand Down Expand Up @@ -3925,7 +3931,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>From the producer account, removes authorization from the specified datashare. </p>"
"smithy.api#documentation": "<p>From a datashare producer account, removes authorization from the specified datashare. </p>"
}
},
"com.amazonaws.redshift#DeauthorizeDataShareMessage": {
Expand Down Expand Up @@ -7070,7 +7076,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>From a consumer account, remove association for the specified datashare.\n </p>"
"smithy.api#documentation": "<p>From a datashare consumer account, remove association for the specified datashare.\n </p>"
}
},
"com.amazonaws.redshift#DisassociateDataShareConsumerMessage": {
Expand Down Expand Up @@ -7978,7 +7984,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>Returns a database user name and temporary password with temporary authorization to\n log on to an Amazon Redshift database. The action returns the database user name\n prefixed with <code>IAM:</code> if <code>AutoCreate</code> is <code>False</code> or\n <code>IAMA:</code> if <code>AutoCreate</code> is <code>True</code>. You can\n optionally specify one or more database user groups that the user will join at log on.\n By default, the temporary credentials expire in 900 seconds. You can optionally specify\n a duration between 900 seconds (15 minutes) and 3600 seconds (60 minutes). For more\n information, see <a href=\"https://docs.aws.amazon.com/redshift/latest/mgmt/generating-user-credentials.html\">Using IAM Authentication\n to Generate Database User Credentials</a> in the Amazon Redshift Cluster Management Guide.</p>\n <p>The Identity and Access Management (IAM) user or role that runs\n GetClusterCredentials must have an IAM policy attached that allows access to all\n necessary actions and resources. For more information about permissions, see <a href=\"https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html#redshift-policy-resources.getclustercredentials-resources\">Resource Policies for GetClusterCredentials</a> in the\n Amazon Redshift Cluster Management Guide.</p>\n <p>If the <code>DbGroups</code> parameter is specified, the IAM policy must allow the\n <code>redshift:JoinGroup</code> action with access to the listed\n <code>dbgroups</code>. </p>\n <p>In addition, if the <code>AutoCreate</code> parameter is set to <code>True</code>,\n then the policy must include the <code>redshift:CreateClusterUser</code>\n privilege.</p>\n <p>If the <code>DbName</code> parameter is specified, the IAM policy must allow access\n to the resource <code>dbname</code> for the specified database name. </p>"
"smithy.api#documentation": "<p>Returns a database user name and temporary password with temporary authorization to\n log on to an Amazon Redshift database. The action returns the database user name\n prefixed with <code>IAM:</code> if <code>AutoCreate</code> is <code>False</code> or\n <code>IAMA:</code> if <code>AutoCreate</code> is <code>True</code>. You can\n optionally specify one or more database user groups that the user will join at log on.\n By default, the temporary credentials expire in 900 seconds. You can optionally specify\n a duration between 900 seconds (15 minutes) and 3600 seconds (60 minutes). For more\n information, see <a href=\"https://docs.aws.amazon.com/redshift/latest/mgmt/generating-user-credentials.html\">Using IAM Authentication\n to Generate Database User Credentials</a> in the Amazon Redshift Cluster Management Guide.</p>\n <p>The Identity and Access Management (IAM) user or role that runs\n GetClusterCredentials must have an IAM policy attached that allows access to all\n necessary actions and resources. For more information about permissions, see <a href=\"https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-identity-based.html#redshift-policy-resources.getclustercredentials-resources\">Resource Policies for GetClusterCredentials</a> in the\n Amazon Redshift Cluster Management Guide.</p>\n <p>If the <code>DbGroups</code> parameter is specified, the IAM policy must allow the\n <code>redshift:JoinGroup</code> action with access to the listed\n <code>dbgroups</code>. </p>\n <p>In addition, if the <code>AutoCreate</code> parameter is set to <code>True</code>,\n then the policy must include the <code>redshift:CreateClusterUser</code>\n permission.</p>\n <p>If the <code>DbName</code> parameter is specified, the IAM policy must allow access\n to the resource <code>dbname</code> for the specified database name. </p>"
}
},
"com.amazonaws.redshift#GetClusterCredentialsMessage": {
Expand Down Expand Up @@ -11596,7 +11602,7 @@
}
],
"traits": {
"smithy.api#documentation": "<p>From the consumer account, rejects the specified datashare.</p>"
"smithy.api#documentation": "<p>From a datashare consumer account, rejects the specified datashare.</p>"
}
},
"com.amazonaws.redshift#RejectDataShareMessage": {
Expand Down

0 comments on commit 9b91388

Please sign in to comment.