Skip to content

Commit 9159aa9

Browse files
author
awstools
committed
feat(client-datasync): AWS DataSync now supports Amazon FSx for OpenZFS locations.
1 parent 6f94efe commit 9159aa9

File tree

10 files changed

+953
-117
lines changed

10 files changed

+953
-117
lines changed

clients/client-datasync/src/DataSync.ts

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ import {
1616
CreateLocationFsxLustreCommandInput,
1717
CreateLocationFsxLustreCommandOutput,
1818
} from "./commands/CreateLocationFsxLustreCommand";
19+
import {
20+
CreateLocationFsxOpenZfsCommand,
21+
CreateLocationFsxOpenZfsCommandInput,
22+
CreateLocationFsxOpenZfsCommandOutput,
23+
} from "./commands/CreateLocationFsxOpenZfsCommand";
1924
import {
2025
CreateLocationFsxWindowsCommand,
2126
CreateLocationFsxWindowsCommandInput,
@@ -69,6 +74,11 @@ import {
6974
DescribeLocationFsxLustreCommandInput,
7075
DescribeLocationFsxLustreCommandOutput,
7176
} from "./commands/DescribeLocationFsxLustreCommand";
77+
import {
78+
DescribeLocationFsxOpenZfsCommand,
79+
DescribeLocationFsxOpenZfsCommandInput,
80+
DescribeLocationFsxOpenZfsCommandOutput,
81+
} from "./commands/DescribeLocationFsxOpenZfsCommand";
7282
import {
7383
DescribeLocationFsxWindowsCommand,
7484
DescribeLocationFsxWindowsCommandInput,
@@ -319,6 +329,38 @@ export class DataSync extends DataSyncClient {
319329
}
320330
}
321331

332+
/**
333+
* <p>Creates an endpoint for an Amazon FSx for OpenZFS file system.</p>
334+
*/
335+
public createLocationFsxOpenZfs(
336+
args: CreateLocationFsxOpenZfsCommandInput,
337+
options?: __HttpHandlerOptions
338+
): Promise<CreateLocationFsxOpenZfsCommandOutput>;
339+
public createLocationFsxOpenZfs(
340+
args: CreateLocationFsxOpenZfsCommandInput,
341+
cb: (err: any, data?: CreateLocationFsxOpenZfsCommandOutput) => void
342+
): void;
343+
public createLocationFsxOpenZfs(
344+
args: CreateLocationFsxOpenZfsCommandInput,
345+
options: __HttpHandlerOptions,
346+
cb: (err: any, data?: CreateLocationFsxOpenZfsCommandOutput) => void
347+
): void;
348+
public createLocationFsxOpenZfs(
349+
args: CreateLocationFsxOpenZfsCommandInput,
350+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationFsxOpenZfsCommandOutput) => void),
351+
cb?: (err: any, data?: CreateLocationFsxOpenZfsCommandOutput) => void
352+
): Promise<CreateLocationFsxOpenZfsCommandOutput> | void {
353+
const command = new CreateLocationFsxOpenZfsCommand(args);
354+
if (typeof optionsOrCb === "function") {
355+
this.send(command, optionsOrCb);
356+
} else if (typeof cb === "function") {
357+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
358+
this.send(command, optionsOrCb || {}, cb);
359+
} else {
360+
return this.send(command, optionsOrCb);
361+
}
362+
}
363+
322364
/**
323365
* <p>Creates an endpoint for an Amazon FSx for Windows File Server file system.</p>
324366
*/
@@ -718,8 +760,8 @@ export class DataSync extends DataSyncClient {
718760
}
719761

720762
/**
721-
* <p>Returns metadata, such as the path information about an Amazon FSx for Lustre
722-
* location.</p>
763+
* <p>Returns metadata about an Amazon FSx for Lustre
764+
* location, such as information about its path.</p>
723765
*/
724766
public describeLocationFsxLustre(
725767
args: DescribeLocationFsxLustreCommandInput,
@@ -751,8 +793,41 @@ export class DataSync extends DataSyncClient {
751793
}
752794

753795
/**
754-
* <p>Returns metadata, such as the path information about an Amazon FSx for Windows File Server
755-
* location.</p>
796+
* <p>Returns metadata about an Amazon FSx for OpenZFS
797+
* location, such as information about its path.</p>
798+
*/
799+
public describeLocationFsxOpenZfs(
800+
args: DescribeLocationFsxOpenZfsCommandInput,
801+
options?: __HttpHandlerOptions
802+
): Promise<DescribeLocationFsxOpenZfsCommandOutput>;
803+
public describeLocationFsxOpenZfs(
804+
args: DescribeLocationFsxOpenZfsCommandInput,
805+
cb: (err: any, data?: DescribeLocationFsxOpenZfsCommandOutput) => void
806+
): void;
807+
public describeLocationFsxOpenZfs(
808+
args: DescribeLocationFsxOpenZfsCommandInput,
809+
options: __HttpHandlerOptions,
810+
cb: (err: any, data?: DescribeLocationFsxOpenZfsCommandOutput) => void
811+
): void;
812+
public describeLocationFsxOpenZfs(
813+
args: DescribeLocationFsxOpenZfsCommandInput,
814+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationFsxOpenZfsCommandOutput) => void),
815+
cb?: (err: any, data?: DescribeLocationFsxOpenZfsCommandOutput) => void
816+
): Promise<DescribeLocationFsxOpenZfsCommandOutput> | void {
817+
const command = new DescribeLocationFsxOpenZfsCommand(args);
818+
if (typeof optionsOrCb === "function") {
819+
this.send(command, optionsOrCb);
820+
} else if (typeof cb === "function") {
821+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
822+
this.send(command, optionsOrCb || {}, cb);
823+
} else {
824+
return this.send(command, optionsOrCb);
825+
}
826+
}
827+
828+
/**
829+
* <p>Returns metadata about an Amazon FSx for Windows File Server
830+
* location, such as information about its path.</p>
756831
*/
757832
public describeLocationFsxWindows(
758833
args: DescribeLocationFsxWindowsCommandInput,

clients/client-datasync/src/DataSyncClient.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ import {
6161
CreateLocationFsxLustreCommandInput,
6262
CreateLocationFsxLustreCommandOutput,
6363
} from "./commands/CreateLocationFsxLustreCommand";
64+
import {
65+
CreateLocationFsxOpenZfsCommandInput,
66+
CreateLocationFsxOpenZfsCommandOutput,
67+
} from "./commands/CreateLocationFsxOpenZfsCommand";
6468
import {
6569
CreateLocationFsxWindowsCommandInput,
6670
CreateLocationFsxWindowsCommandOutput,
@@ -86,6 +90,10 @@ import {
8690
DescribeLocationFsxLustreCommandInput,
8791
DescribeLocationFsxLustreCommandOutput,
8892
} from "./commands/DescribeLocationFsxLustreCommand";
93+
import {
94+
DescribeLocationFsxOpenZfsCommandInput,
95+
DescribeLocationFsxOpenZfsCommandOutput,
96+
} from "./commands/DescribeLocationFsxOpenZfsCommand";
8997
import {
9098
DescribeLocationFsxWindowsCommandInput,
9199
DescribeLocationFsxWindowsCommandOutput,
@@ -143,6 +151,7 @@ export type ServiceInputTypes =
143151
| CreateAgentCommandInput
144152
| CreateLocationEfsCommandInput
145153
| CreateLocationFsxLustreCommandInput
154+
| CreateLocationFsxOpenZfsCommandInput
146155
| CreateLocationFsxWindowsCommandInput
147156
| CreateLocationHdfsCommandInput
148157
| CreateLocationNfsCommandInput
@@ -156,6 +165,7 @@ export type ServiceInputTypes =
156165
| DescribeAgentCommandInput
157166
| DescribeLocationEfsCommandInput
158167
| DescribeLocationFsxLustreCommandInput
168+
| DescribeLocationFsxOpenZfsCommandInput
159169
| DescribeLocationFsxWindowsCommandInput
160170
| DescribeLocationHdfsCommandInput
161171
| DescribeLocationNfsCommandInput
@@ -185,6 +195,7 @@ export type ServiceOutputTypes =
185195
| CreateAgentCommandOutput
186196
| CreateLocationEfsCommandOutput
187197
| CreateLocationFsxLustreCommandOutput
198+
| CreateLocationFsxOpenZfsCommandOutput
188199
| CreateLocationFsxWindowsCommandOutput
189200
| CreateLocationHdfsCommandOutput
190201
| CreateLocationNfsCommandOutput
@@ -198,6 +209,7 @@ export type ServiceOutputTypes =
198209
| DescribeAgentCommandOutput
199210
| DescribeLocationEfsCommandOutput
200211
| DescribeLocationFsxLustreCommandOutput
212+
| DescribeLocationFsxOpenZfsCommandOutput
201213
| DescribeLocationFsxWindowsCommandOutput
202214
| DescribeLocationHdfsCommandOutput
203215
| DescribeLocationNfsCommandOutput
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3+
import { Command as $Command } from "@aws-sdk/smithy-client";
4+
import {
5+
FinalizeHandlerArguments,
6+
Handler,
7+
HandlerExecutionContext,
8+
HttpHandlerOptions as __HttpHandlerOptions,
9+
MetadataBearer as __MetadataBearer,
10+
MiddlewareStack,
11+
SerdeContext as __SerdeContext,
12+
} from "@aws-sdk/types";
13+
14+
import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient";
15+
import { CreateLocationFsxOpenZfsRequest, CreateLocationFsxOpenZfsResponse } from "../models/models_0";
16+
import {
17+
deserializeAws_json1_1CreateLocationFsxOpenZfsCommand,
18+
serializeAws_json1_1CreateLocationFsxOpenZfsCommand,
19+
} from "../protocols/Aws_json1_1";
20+
21+
export interface CreateLocationFsxOpenZfsCommandInput extends CreateLocationFsxOpenZfsRequest {}
22+
export interface CreateLocationFsxOpenZfsCommandOutput extends CreateLocationFsxOpenZfsResponse, __MetadataBearer {}
23+
24+
/**
25+
* <p>Creates an endpoint for an Amazon FSx for OpenZFS file system.</p>
26+
* @example
27+
* Use a bare-bones client and the command you need to make an API call.
28+
* ```javascript
29+
* import { DataSyncClient, CreateLocationFsxOpenZfsCommand } from "@aws-sdk/client-datasync"; // ES Modules import
30+
* // const { DataSyncClient, CreateLocationFsxOpenZfsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
31+
* const client = new DataSyncClient(config);
32+
* const command = new CreateLocationFsxOpenZfsCommand(input);
33+
* const response = await client.send(command);
34+
* ```
35+
*
36+
* @see {@link CreateLocationFsxOpenZfsCommandInput} for command's `input` shape.
37+
* @see {@link CreateLocationFsxOpenZfsCommandOutput} for command's `response` shape.
38+
* @see {@link DataSyncClientResolvedConfig | config} for DataSyncClient's `config` shape.
39+
*
40+
*/
41+
export class CreateLocationFsxOpenZfsCommand extends $Command<
42+
CreateLocationFsxOpenZfsCommandInput,
43+
CreateLocationFsxOpenZfsCommandOutput,
44+
DataSyncClientResolvedConfig
45+
> {
46+
// Start section: command_properties
47+
// End section: command_properties
48+
49+
constructor(readonly input: CreateLocationFsxOpenZfsCommandInput) {
50+
// Start section: command_constructor
51+
super();
52+
// End section: command_constructor
53+
}
54+
55+
/**
56+
* @internal
57+
*/
58+
resolveMiddleware(
59+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
60+
configuration: DataSyncClientResolvedConfig,
61+
options?: __HttpHandlerOptions
62+
): Handler<CreateLocationFsxOpenZfsCommandInput, CreateLocationFsxOpenZfsCommandOutput> {
63+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
64+
65+
const stack = clientStack.concat(this.middlewareStack);
66+
67+
const { logger } = configuration;
68+
const clientName = "DataSyncClient";
69+
const commandName = "CreateLocationFsxOpenZfsCommand";
70+
const handlerExecutionContext: HandlerExecutionContext = {
71+
logger,
72+
clientName,
73+
commandName,
74+
inputFilterSensitiveLog: CreateLocationFsxOpenZfsRequest.filterSensitiveLog,
75+
outputFilterSensitiveLog: CreateLocationFsxOpenZfsResponse.filterSensitiveLog,
76+
};
77+
const { requestHandler } = configuration;
78+
return stack.resolve(
79+
(request: FinalizeHandlerArguments<any>) =>
80+
requestHandler.handle(request.request as __HttpRequest, options || {}),
81+
handlerExecutionContext
82+
);
83+
}
84+
85+
private serialize(input: CreateLocationFsxOpenZfsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
86+
return serializeAws_json1_1CreateLocationFsxOpenZfsCommand(input, context);
87+
}
88+
89+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateLocationFsxOpenZfsCommandOutput> {
90+
return deserializeAws_json1_1CreateLocationFsxOpenZfsCommand(output, context);
91+
}
92+
93+
// Start section: command_body_extra
94+
// End section: command_body_extra
95+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export interface DescribeLocationFsxLustreCommandInput extends DescribeLocationF
2222
export interface DescribeLocationFsxLustreCommandOutput extends DescribeLocationFsxLustreResponse, __MetadataBearer {}
2323

2424
/**
25-
* <p>Returns metadata, such as the path information about an Amazon FSx for Lustre
26-
* location.</p>
25+
* <p>Returns metadata about an Amazon FSx for Lustre
26+
* location, such as information about its path.</p>
2727
* @example
2828
* Use a bare-bones client and the command you need to make an API call.
2929
* ```javascript
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3+
import { Command as $Command } from "@aws-sdk/smithy-client";
4+
import {
5+
FinalizeHandlerArguments,
6+
Handler,
7+
HandlerExecutionContext,
8+
HttpHandlerOptions as __HttpHandlerOptions,
9+
MetadataBearer as __MetadataBearer,
10+
MiddlewareStack,
11+
SerdeContext as __SerdeContext,
12+
} from "@aws-sdk/types";
13+
14+
import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient";
15+
import { DescribeLocationFsxOpenZfsRequest, DescribeLocationFsxOpenZfsResponse } from "../models/models_0";
16+
import {
17+
deserializeAws_json1_1DescribeLocationFsxOpenZfsCommand,
18+
serializeAws_json1_1DescribeLocationFsxOpenZfsCommand,
19+
} from "../protocols/Aws_json1_1";
20+
21+
export interface DescribeLocationFsxOpenZfsCommandInput extends DescribeLocationFsxOpenZfsRequest {}
22+
export interface DescribeLocationFsxOpenZfsCommandOutput extends DescribeLocationFsxOpenZfsResponse, __MetadataBearer {}
23+
24+
/**
25+
* <p>Returns metadata about an Amazon FSx for OpenZFS
26+
* location, such as information about its path.</p>
27+
* @example
28+
* Use a bare-bones client and the command you need to make an API call.
29+
* ```javascript
30+
* import { DataSyncClient, DescribeLocationFsxOpenZfsCommand } from "@aws-sdk/client-datasync"; // ES Modules import
31+
* // const { DataSyncClient, DescribeLocationFsxOpenZfsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
32+
* const client = new DataSyncClient(config);
33+
* const command = new DescribeLocationFsxOpenZfsCommand(input);
34+
* const response = await client.send(command);
35+
* ```
36+
*
37+
* @see {@link DescribeLocationFsxOpenZfsCommandInput} for command's `input` shape.
38+
* @see {@link DescribeLocationFsxOpenZfsCommandOutput} for command's `response` shape.
39+
* @see {@link DataSyncClientResolvedConfig | config} for DataSyncClient's `config` shape.
40+
*
41+
*/
42+
export class DescribeLocationFsxOpenZfsCommand extends $Command<
43+
DescribeLocationFsxOpenZfsCommandInput,
44+
DescribeLocationFsxOpenZfsCommandOutput,
45+
DataSyncClientResolvedConfig
46+
> {
47+
// Start section: command_properties
48+
// End section: command_properties
49+
50+
constructor(readonly input: DescribeLocationFsxOpenZfsCommandInput) {
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<DescribeLocationFsxOpenZfsCommandInput, DescribeLocationFsxOpenZfsCommandOutput> {
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 = "DescribeLocationFsxOpenZfsCommand";
71+
const handlerExecutionContext: HandlerExecutionContext = {
72+
logger,
73+
clientName,
74+
commandName,
75+
inputFilterSensitiveLog: DescribeLocationFsxOpenZfsRequest.filterSensitiveLog,
76+
outputFilterSensitiveLog: DescribeLocationFsxOpenZfsResponse.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: DescribeLocationFsxOpenZfsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
87+
return serializeAws_json1_1DescribeLocationFsxOpenZfsCommand(input, context);
88+
}
89+
90+
private deserialize(
91+
output: __HttpResponse,
92+
context: __SerdeContext
93+
): Promise<DescribeLocationFsxOpenZfsCommandOutput> {
94+
return deserializeAws_json1_1DescribeLocationFsxOpenZfsCommand(output, context);
95+
}
96+
97+
// Start section: command_body_extra
98+
// End section: command_body_extra
99+
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export interface DescribeLocationFsxWindowsCommandInput extends DescribeLocation
2222
export interface DescribeLocationFsxWindowsCommandOutput extends DescribeLocationFsxWindowsResponse, __MetadataBearer {}
2323

2424
/**
25-
* <p>Returns metadata, such as the path information about an Amazon FSx for Windows File Server
26-
* location.</p>
25+
* <p>Returns metadata about an Amazon FSx for Windows File Server
26+
* location, such as information about its path.</p>
2727
* @example
2828
* Use a bare-bones client and the command you need to make an API call.
2929
* ```javascript

0 commit comments

Comments
 (0)