Skip to content

Commit 87a3aac

Browse files
author
awstools
committed
feat(client-datasync): AWS DataSync now supports Amazon FSx for NetApp ONTAP locations.
1 parent 89baffe commit 87a3aac

File tree

10 files changed

+1096
-210
lines changed

10 files changed

+1096
-210
lines changed

clients/client-datasync/src/DataSync.ts

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ import {
1717
CreateLocationFsxLustreCommandInput,
1818
CreateLocationFsxLustreCommandOutput,
1919
} from "./commands/CreateLocationFsxLustreCommand";
20+
import {
21+
CreateLocationFsxOntapCommand,
22+
CreateLocationFsxOntapCommandInput,
23+
CreateLocationFsxOntapCommandOutput,
24+
} from "./commands/CreateLocationFsxOntapCommand";
2025
import {
2126
CreateLocationFsxOpenZfsCommand,
2227
CreateLocationFsxOpenZfsCommandInput,
@@ -75,6 +80,11 @@ import {
7580
DescribeLocationFsxLustreCommandInput,
7681
DescribeLocationFsxLustreCommandOutput,
7782
} from "./commands/DescribeLocationFsxLustreCommand";
83+
import {
84+
DescribeLocationFsxOntapCommand,
85+
DescribeLocationFsxOntapCommandInput,
86+
DescribeLocationFsxOntapCommandOutput,
87+
} from "./commands/DescribeLocationFsxOntapCommand";
7888
import {
7989
DescribeLocationFsxOpenZfsCommand,
8090
DescribeLocationFsxOpenZfsCommandInput,
@@ -331,6 +341,39 @@ export class DataSync extends DataSyncClient {
331341
}
332342
}
333343

344+
/**
345+
* <p>Creates an endpoint for an Amazon FSx for NetApp ONTAP file system that DataSync
346+
* can access for a transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html">Creating a location for FSx for ONTAP</a>.</p>
347+
*/
348+
public createLocationFsxOntap(
349+
args: CreateLocationFsxOntapCommandInput,
350+
options?: __HttpHandlerOptions
351+
): Promise<CreateLocationFsxOntapCommandOutput>;
352+
public createLocationFsxOntap(
353+
args: CreateLocationFsxOntapCommandInput,
354+
cb: (err: any, data?: CreateLocationFsxOntapCommandOutput) => void
355+
): void;
356+
public createLocationFsxOntap(
357+
args: CreateLocationFsxOntapCommandInput,
358+
options: __HttpHandlerOptions,
359+
cb: (err: any, data?: CreateLocationFsxOntapCommandOutput) => void
360+
): void;
361+
public createLocationFsxOntap(
362+
args: CreateLocationFsxOntapCommandInput,
363+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationFsxOntapCommandOutput) => void),
364+
cb?: (err: any, data?: CreateLocationFsxOntapCommandOutput) => void
365+
): Promise<CreateLocationFsxOntapCommandOutput> | void {
366+
const command = new CreateLocationFsxOntapCommand(args);
367+
if (typeof optionsOrCb === "function") {
368+
this.send(command, optionsOrCb);
369+
} else if (typeof cb === "function") {
370+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
371+
this.send(command, optionsOrCb || {}, cb);
372+
} else {
373+
return this.send(command, optionsOrCb);
374+
}
375+
}
376+
334377
/**
335378
* <p>Creates an endpoint for an Amazon FSx for OpenZFS file system.</p>
336379
*/
@@ -461,8 +504,7 @@ export class DataSync extends DataSyncClient {
461504
}
462505

463506
/**
464-
* <p>Creates an endpoint for a self-managed object storage bucket. For more information
465-
* about self-managed object storage locations, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html">Creating a location for object storage</a>.</p>
507+
* <p>Creates an endpoint for an object storage system that DataSync can access for a transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html">Creating a location for object storage</a>.</p>
466508
*/
467509
public createLocationObjectStorage(
468510
args: CreateLocationObjectStorageCommandInput,
@@ -794,6 +836,38 @@ export class DataSync extends DataSyncClient {
794836
}
795837
}
796838

839+
/**
840+
* <p>Provides details about how an DataSync location for an Amazon FSx for NetApp ONTAP file system is configured.</p>
841+
*/
842+
public describeLocationFsxOntap(
843+
args: DescribeLocationFsxOntapCommandInput,
844+
options?: __HttpHandlerOptions
845+
): Promise<DescribeLocationFsxOntapCommandOutput>;
846+
public describeLocationFsxOntap(
847+
args: DescribeLocationFsxOntapCommandInput,
848+
cb: (err: any, data?: DescribeLocationFsxOntapCommandOutput) => void
849+
): void;
850+
public describeLocationFsxOntap(
851+
args: DescribeLocationFsxOntapCommandInput,
852+
options: __HttpHandlerOptions,
853+
cb: (err: any, data?: DescribeLocationFsxOntapCommandOutput) => void
854+
): void;
855+
public describeLocationFsxOntap(
856+
args: DescribeLocationFsxOntapCommandInput,
857+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationFsxOntapCommandOutput) => void),
858+
cb?: (err: any, data?: DescribeLocationFsxOntapCommandOutput) => void
859+
): Promise<DescribeLocationFsxOntapCommandOutput> | void {
860+
const command = new DescribeLocationFsxOntapCommand(args);
861+
if (typeof optionsOrCb === "function") {
862+
this.send(command, optionsOrCb);
863+
} else if (typeof cb === "function") {
864+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
865+
this.send(command, optionsOrCb || {}, cb);
866+
} else {
867+
return this.send(command, optionsOrCb);
868+
}
869+
}
870+
797871
/**
798872
* <p>Returns metadata about an Amazon FSx for OpenZFS
799873
* location, such as information about its path.</p>
@@ -926,8 +1000,7 @@ export class DataSync extends DataSyncClient {
9261000
}
9271001

9281002
/**
929-
* <p>Returns metadata about a self-managed object storage server location. For more information
930-
* about self-managed object storage locations, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html">Creating a location for object storage</a>.</p>
1003+
* <p>Returns metadata about your DataSync location for an object storage system.</p>
9311004
*/
9321005
public describeLocationObjectStorage(
9331006
args: DescribeLocationObjectStorageCommandInput,

clients/client-datasync/src/DataSyncClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ import {
6363
CreateLocationFsxLustreCommandInput,
6464
CreateLocationFsxLustreCommandOutput,
6565
} from "./commands/CreateLocationFsxLustreCommand";
66+
import {
67+
CreateLocationFsxOntapCommandInput,
68+
CreateLocationFsxOntapCommandOutput,
69+
} from "./commands/CreateLocationFsxOntapCommand";
6670
import {
6771
CreateLocationFsxOpenZfsCommandInput,
6872
CreateLocationFsxOpenZfsCommandOutput,
@@ -92,6 +96,10 @@ import {
9296
DescribeLocationFsxLustreCommandInput,
9397
DescribeLocationFsxLustreCommandOutput,
9498
} from "./commands/DescribeLocationFsxLustreCommand";
99+
import {
100+
DescribeLocationFsxOntapCommandInput,
101+
DescribeLocationFsxOntapCommandOutput,
102+
} from "./commands/DescribeLocationFsxOntapCommand";
95103
import {
96104
DescribeLocationFsxOpenZfsCommandInput,
97105
DescribeLocationFsxOpenZfsCommandOutput,
@@ -153,6 +161,7 @@ export type ServiceInputTypes =
153161
| CreateAgentCommandInput
154162
| CreateLocationEfsCommandInput
155163
| CreateLocationFsxLustreCommandInput
164+
| CreateLocationFsxOntapCommandInput
156165
| CreateLocationFsxOpenZfsCommandInput
157166
| CreateLocationFsxWindowsCommandInput
158167
| CreateLocationHdfsCommandInput
@@ -167,6 +176,7 @@ export type ServiceInputTypes =
167176
| DescribeAgentCommandInput
168177
| DescribeLocationEfsCommandInput
169178
| DescribeLocationFsxLustreCommandInput
179+
| DescribeLocationFsxOntapCommandInput
170180
| DescribeLocationFsxOpenZfsCommandInput
171181
| DescribeLocationFsxWindowsCommandInput
172182
| DescribeLocationHdfsCommandInput
@@ -197,6 +207,7 @@ export type ServiceOutputTypes =
197207
| CreateAgentCommandOutput
198208
| CreateLocationEfsCommandOutput
199209
| CreateLocationFsxLustreCommandOutput
210+
| CreateLocationFsxOntapCommandOutput
200211
| CreateLocationFsxOpenZfsCommandOutput
201212
| CreateLocationFsxWindowsCommandOutput
202213
| CreateLocationHdfsCommandOutput
@@ -211,6 +222,7 @@ export type ServiceOutputTypes =
211222
| DescribeAgentCommandOutput
212223
| DescribeLocationEfsCommandOutput
213224
| DescribeLocationFsxLustreCommandOutput
225+
| DescribeLocationFsxOntapCommandOutput
214226
| DescribeLocationFsxOpenZfsCommandOutput
215227
| DescribeLocationFsxWindowsCommandOutput
216228
| DescribeLocationHdfsCommandOutput
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient";
16+
import { CreateLocationFsxOntapRequest, CreateLocationFsxOntapResponse } from "../models/models_0";
17+
import {
18+
deserializeAws_json1_1CreateLocationFsxOntapCommand,
19+
serializeAws_json1_1CreateLocationFsxOntapCommand,
20+
} from "../protocols/Aws_json1_1";
21+
22+
export interface CreateLocationFsxOntapCommandInput extends CreateLocationFsxOntapRequest {}
23+
export interface CreateLocationFsxOntapCommandOutput extends CreateLocationFsxOntapResponse, __MetadataBearer {}
24+
25+
/**
26+
* <p>Creates an endpoint for an Amazon FSx for NetApp ONTAP file system that DataSync
27+
* can access for a transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-ontap-location.html">Creating a location for FSx for ONTAP</a>.</p>
28+
* @example
29+
* Use a bare-bones client and the command you need to make an API call.
30+
* ```javascript
31+
* import { DataSyncClient, CreateLocationFsxOntapCommand } from "@aws-sdk/client-datasync"; // ES Modules import
32+
* // const { DataSyncClient, CreateLocationFsxOntapCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
33+
* const client = new DataSyncClient(config);
34+
* const command = new CreateLocationFsxOntapCommand(input);
35+
* const response = await client.send(command);
36+
* ```
37+
*
38+
* @see {@link CreateLocationFsxOntapCommandInput} for command's `input` shape.
39+
* @see {@link CreateLocationFsxOntapCommandOutput} for command's `response` shape.
40+
* @see {@link DataSyncClientResolvedConfig | config} for DataSyncClient's `config` shape.
41+
*
42+
*/
43+
export class CreateLocationFsxOntapCommand extends $Command<
44+
CreateLocationFsxOntapCommandInput,
45+
CreateLocationFsxOntapCommandOutput,
46+
DataSyncClientResolvedConfig
47+
> {
48+
// Start section: command_properties
49+
// End section: command_properties
50+
51+
constructor(readonly input: CreateLocationFsxOntapCommandInput) {
52+
// Start section: command_constructor
53+
super();
54+
// End section: command_constructor
55+
}
56+
57+
/**
58+
* @internal
59+
*/
60+
resolveMiddleware(
61+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
62+
configuration: DataSyncClientResolvedConfig,
63+
options?: __HttpHandlerOptions
64+
): Handler<CreateLocationFsxOntapCommandInput, CreateLocationFsxOntapCommandOutput> {
65+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
66+
67+
const stack = clientStack.concat(this.middlewareStack);
68+
69+
const { logger } = configuration;
70+
const clientName = "DataSyncClient";
71+
const commandName = "CreateLocationFsxOntapCommand";
72+
const handlerExecutionContext: HandlerExecutionContext = {
73+
logger,
74+
clientName,
75+
commandName,
76+
inputFilterSensitiveLog: CreateLocationFsxOntapRequest.filterSensitiveLog,
77+
outputFilterSensitiveLog: CreateLocationFsxOntapResponse.filterSensitiveLog,
78+
};
79+
const { requestHandler } = configuration;
80+
return stack.resolve(
81+
(request: FinalizeHandlerArguments<any>) =>
82+
requestHandler.handle(request.request as __HttpRequest, options || {}),
83+
handlerExecutionContext
84+
);
85+
}
86+
87+
private serialize(input: CreateLocationFsxOntapCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
88+
return serializeAws_json1_1CreateLocationFsxOntapCommand(input, context);
89+
}
90+
91+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateLocationFsxOntapCommandOutput> {
92+
return deserializeAws_json1_1CreateLocationFsxOntapCommand(output, context);
93+
}
94+
95+
// Start section: command_body_extra
96+
// End section: command_body_extra
97+
}

clients/client-datasync/src/commands/CreateLocationObjectStorageCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ export interface CreateLocationObjectStorageCommandOutput
2525
__MetadataBearer {}
2626

2727
/**
28-
* <p>Creates an endpoint for a self-managed object storage bucket. For more information
29-
* about self-managed object storage locations, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html">Creating a location for object storage</a>.</p>
28+
* <p>Creates an endpoint for an object storage system that DataSync can access for a transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html">Creating a location for object storage</a>.</p>
3029
* @example
3130
* Use a bare-bones client and the command you need to make an API call.
3231
* ```javascript
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient";
16+
import { DescribeLocationFsxOntapRequest, DescribeLocationFsxOntapResponse } from "../models/models_0";
17+
import {
18+
deserializeAws_json1_1DescribeLocationFsxOntapCommand,
19+
serializeAws_json1_1DescribeLocationFsxOntapCommand,
20+
} from "../protocols/Aws_json1_1";
21+
22+
export interface DescribeLocationFsxOntapCommandInput extends DescribeLocationFsxOntapRequest {}
23+
export interface DescribeLocationFsxOntapCommandOutput extends DescribeLocationFsxOntapResponse, __MetadataBearer {}
24+
25+
/**
26+
* <p>Provides details about how an DataSync location for an Amazon FSx for NetApp ONTAP file system is configured.</p>
27+
* @example
28+
* Use a bare-bones client and the command you need to make an API call.
29+
* ```javascript
30+
* import { DataSyncClient, DescribeLocationFsxOntapCommand } from "@aws-sdk/client-datasync"; // ES Modules import
31+
* // const { DataSyncClient, DescribeLocationFsxOntapCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
32+
* const client = new DataSyncClient(config);
33+
* const command = new DescribeLocationFsxOntapCommand(input);
34+
* const response = await client.send(command);
35+
* ```
36+
*
37+
* @see {@link DescribeLocationFsxOntapCommandInput} for command's `input` shape.
38+
* @see {@link DescribeLocationFsxOntapCommandOutput} for command's `response` shape.
39+
* @see {@link DataSyncClientResolvedConfig | config} for DataSyncClient's `config` shape.
40+
*
41+
*/
42+
export class DescribeLocationFsxOntapCommand extends $Command<
43+
DescribeLocationFsxOntapCommandInput,
44+
DescribeLocationFsxOntapCommandOutput,
45+
DataSyncClientResolvedConfig
46+
> {
47+
// Start section: command_properties
48+
// End section: command_properties
49+
50+
constructor(readonly input: DescribeLocationFsxOntapCommandInput) {
51+
// Start section: command_constructor
52+
super();
53+
// End section: command_constructor
54+
}
55+
56+
/**
57+
* @internal
58+
*/
59+
resolveMiddleware(
60+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
61+
configuration: DataSyncClientResolvedConfig,
62+
options?: __HttpHandlerOptions
63+
): Handler<DescribeLocationFsxOntapCommandInput, DescribeLocationFsxOntapCommandOutput> {
64+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
65+
66+
const stack = clientStack.concat(this.middlewareStack);
67+
68+
const { logger } = configuration;
69+
const clientName = "DataSyncClient";
70+
const commandName = "DescribeLocationFsxOntapCommand";
71+
const handlerExecutionContext: HandlerExecutionContext = {
72+
logger,
73+
clientName,
74+
commandName,
75+
inputFilterSensitiveLog: DescribeLocationFsxOntapRequest.filterSensitiveLog,
76+
outputFilterSensitiveLog: DescribeLocationFsxOntapResponse.filterSensitiveLog,
77+
};
78+
const { requestHandler } = configuration;
79+
return stack.resolve(
80+
(request: FinalizeHandlerArguments<any>) =>
81+
requestHandler.handle(request.request as __HttpRequest, options || {}),
82+
handlerExecutionContext
83+
);
84+
}
85+
86+
private serialize(input: DescribeLocationFsxOntapCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
87+
return serializeAws_json1_1DescribeLocationFsxOntapCommand(input, context);
88+
}
89+
90+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DescribeLocationFsxOntapCommandOutput> {
91+
return deserializeAws_json1_1DescribeLocationFsxOntapCommand(output, context);
92+
}
93+
94+
// Start section: command_body_extra
95+
// End section: command_body_extra
96+
}

clients/client-datasync/src/commands/DescribeLocationObjectStorageCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ export interface DescribeLocationObjectStorageCommandOutput
2525
__MetadataBearer {}
2626

2727
/**
28-
* <p>Returns metadata about a self-managed object storage server location. For more information
29-
* about self-managed object storage locations, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html">Creating a location for object storage</a>.</p>
28+
* <p>Returns metadata about your DataSync location for an object storage system.</p>
3029
* @example
3130
* Use a bare-bones client and the command you need to make an API call.
3231
* ```javascript

0 commit comments

Comments
 (0)