Skip to content

Commit

Permalink
feat(client-datasync): With this launch, we are giving customers the …
Browse files Browse the repository at this point in the history
…ability to use older SMB protocol versions, enabling them to use DataSync to copy data to and from their legacy storage arrays.
  • Loading branch information
awstools committed Feb 14, 2023
1 parent 62c8b91 commit 125850c
Show file tree
Hide file tree
Showing 9 changed files with 840 additions and 1,569 deletions.
33 changes: 15 additions & 18 deletions clients/client-datasync/src/DataSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -538,11 +538,8 @@ export class DataSync extends DataSyncClient {
}

/**
* <p>Creates an endpoint for an Amazon S3 bucket that DataSync can access for a transfer.</p>
* <p>For
* more information, see
* <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-locations-cli.html#create-location-s3-cli">Create an Amazon S3 location</a>
* in the <i>DataSync User Guide</i>.</p>
* <p>Creates an endpoint for an Amazon S3 bucket that DataSync can
* access for a transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-locations-cli.html#create-location-s3-cli">Create an Amazon S3 location</a>.</p>
*/
public createLocationS3(
args: CreateLocationS3CommandInput,
Expand Down Expand Up @@ -574,8 +571,7 @@ export class DataSync extends DataSyncClient {
}

/**
* <p>Defines a file system on a Server Message Block (SMB) server that can be read from or
* written to.</p>
* <p>Creates an endpoint for a Server Message Block (SMB) file server that DataSync can access for a transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html">Creating an SMB location</a>.</p>
*/
public createLocationSmb(
args: CreateLocationSmbCommandInput,
Expand Down Expand Up @@ -724,9 +720,7 @@ export class DataSync extends DataSyncClient {
}

/**
* <p>Returns metadata such as the name, the network interfaces, and the status (that is,
* whether the agent is running or not) for an agent. To specify which agent to describe, use the
* Amazon Resource Name (ARN) of the agent in your request. </p>
* <p>Returns metadata about an DataSync agent, such as its name, endpoint type, and status.</p>
*/
public describeAgent(
args: DescribeAgentCommandInput,
Expand Down Expand Up @@ -1149,14 +1143,17 @@ export class DataSync extends DataSyncClient {
}

/**
* <p>Returns a list of agents owned by an Amazon Web Services account in the Amazon Web Services Region specified in the
* request. The returned list is ordered by agent Amazon Resource Name (ARN).</p>
* <p>By default, this operation returns a maximum of 100 agents. This operation supports
* pagination that enables you to optionally reduce the number of agents returned in a
* response.</p>
* <p>If you have more agents than are returned in a response (that is, the response returns
* only a truncated list of your agents), the response contains a marker that you can specify in
* your next request to fetch the next page of agents.</p>
* <p>Returns a list of DataSync agents that belong to an Amazon Web Services account in the Amazon Web Services Region specified in the request.</p>
* <p>With pagination, you can reduce the number of agents returned in a response. If you get
* a truncated list of agents in a response, the response contains a marker that you can specify
* in your next request to fetch the next page of agents.</p>
* <p>
* <code>ListAgents</code> is eventually consistent. This means the result of running the
* operation might not reflect that you just created or deleted an agent. For example, if you
* create an agent with <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_CreateAgent.html">CreateAgent</a> and then
* immediately run <code>ListAgents</code>, that agent might not show up in the list right away.
* In situations like this, you can always confirm whether an agent has been created (or deleted)
* by using <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeAgent.html">DescribeAgent</a>.</p>
*/
public listAgents(args: ListAgentsCommandInput, options?: __HttpHandlerOptions): Promise<ListAgentsCommandOutput>;
public listAgents(args: ListAgentsCommandInput, cb: (err: any, data?: ListAgentsCommandOutput) => void): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@ export interface CreateLocationS3CommandInput extends CreateLocationS3Request {}
export interface CreateLocationS3CommandOutput extends CreateLocationS3Response, __MetadataBearer {}

/**
* <p>Creates an endpoint for an Amazon S3 bucket that DataSync can access for a transfer.</p>
* <p>For
* more information, see
* <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-locations-cli.html#create-location-s3-cli">Create an Amazon S3 location</a>
* in the <i>DataSync User Guide</i>.</p>
* <p>Creates an endpoint for an Amazon S3 bucket that DataSync can
* access for a transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-locations-cli.html#create-location-s3-cli">Create an Amazon S3 location</a>.</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 @@ -29,8 +29,7 @@ export interface CreateLocationSmbCommandInput extends CreateLocationSmbRequest
export interface CreateLocationSmbCommandOutput extends CreateLocationSmbResponse, __MetadataBearer {}

/**
* <p>Defines a file system on a Server Message Block (SMB) server that can be read from or
* written to.</p>
* <p>Creates an endpoint for a Server Message Block (SMB) file server that DataSync can access for a transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-smb-location.html">Creating an SMB location</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
4 changes: 1 addition & 3 deletions clients/client-datasync/src/commands/DescribeAgentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export interface DescribeAgentCommandInput extends DescribeAgentRequest {}
export interface DescribeAgentCommandOutput extends DescribeAgentResponse, __MetadataBearer {}

/**
* <p>Returns metadata such as the name, the network interfaces, and the status (that is,
* whether the agent is running or not) for an agent. To specify which agent to describe, use the
* Amazon Resource Name (ARN) of the agent in your request. </p>
* <p>Returns metadata about an DataSync agent, such as its name, endpoint type, and status.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
19 changes: 11 additions & 8 deletions clients/client-datasync/src/commands/ListAgentsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ export interface ListAgentsCommandInput extends ListAgentsRequest {}
export interface ListAgentsCommandOutput extends ListAgentsResponse, __MetadataBearer {}

/**
* <p>Returns a list of agents owned by an Amazon Web Services account in the Amazon Web Services Region specified in the
* request. The returned list is ordered by agent Amazon Resource Name (ARN).</p>
* <p>By default, this operation returns a maximum of 100 agents. This operation supports
* pagination that enables you to optionally reduce the number of agents returned in a
* response.</p>
* <p>If you have more agents than are returned in a response (that is, the response returns
* only a truncated list of your agents), the response contains a marker that you can specify in
* your next request to fetch the next page of agents.</p>
* <p>Returns a list of DataSync agents that belong to an Amazon Web Services account in the Amazon Web Services Region specified in the request.</p>
* <p>With pagination, you can reduce the number of agents returned in a response. If you get
* a truncated list of agents in a response, the response contains a marker that you can specify
* in your next request to fetch the next page of agents.</p>
* <p>
* <code>ListAgents</code> is eventually consistent. This means the result of running the
* operation might not reflect that you just created or deleted an agent. For example, if you
* create an agent with <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_CreateAgent.html">CreateAgent</a> and then
* immediately run <code>ListAgents</code>, that agent might not show up in the list right away.
* In situations like this, you can always confirm whether an agent has been created (or deleted)
* by using <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_DescribeAgent.html">DescribeAgent</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-datasync/src/endpoint/EndpointParameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = <T>(
};

export interface EndpointParameters extends __EndpointParameters {
Region: string;
Region?: string;
UseDualStack?: boolean;
UseFIPS?: boolean;
Endpoint?: string;
Expand Down
39 changes: 20 additions & 19 deletions clients/client-datasync/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,25 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/datasync.json */

const q="fn",
r="argv",
s="ref";
const a=true,
b=false,
c="String",
d="PartitionResult",
e="tree",
f="error",
g="endpoint",
h={"required":true,"default":false,"type":"Boolean"},
i={[s]:"Endpoint"},
j={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
k={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
l={},
m={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsFIPS"]}]},
n={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsDualStack"]}]},
const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[k];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[q]:"isSet",[r]:[i]}],type:e,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:p,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{endpoint:{url:"https://datasync-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:o,type:e,rules:[{conditions:[m],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://datasync-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{endpoint:{url:"https://datasync.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{endpoint:{url:"https://datasync.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]};
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://datasync-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://datasync-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://datasync.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://datasync.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit 125850c

Please sign in to comment.