Skip to content

Commit

Permalink
feat(client-datasync): AWS DataSync now supports Amazon FSx for NetAp…
Browse files Browse the repository at this point in the history
…p ONTAP locations.
  • Loading branch information
awstools committed Jun 28, 2022
1 parent 89baffe commit 87a3aac
Show file tree
Hide file tree
Showing 10 changed files with 1,096 additions and 210 deletions.
81 changes: 77 additions & 4 deletions clients/client-datasync/src/DataSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ import {
CreateLocationFsxLustreCommandInput,
CreateLocationFsxLustreCommandOutput,
} from "./commands/CreateLocationFsxLustreCommand";
import {
CreateLocationFsxOntapCommand,
CreateLocationFsxOntapCommandInput,
CreateLocationFsxOntapCommandOutput,
} from "./commands/CreateLocationFsxOntapCommand";
import {
CreateLocationFsxOpenZfsCommand,
CreateLocationFsxOpenZfsCommandInput,
Expand Down Expand Up @@ -75,6 +80,11 @@ import {
DescribeLocationFsxLustreCommandInput,
DescribeLocationFsxLustreCommandOutput,
} from "./commands/DescribeLocationFsxLustreCommand";
import {
DescribeLocationFsxOntapCommand,
DescribeLocationFsxOntapCommandInput,
DescribeLocationFsxOntapCommandOutput,
} from "./commands/DescribeLocationFsxOntapCommand";
import {
DescribeLocationFsxOpenZfsCommand,
DescribeLocationFsxOpenZfsCommandInput,
Expand Down Expand Up @@ -331,6 +341,39 @@ export class DataSync extends DataSyncClient {
}
}

/**
* <p>Creates an endpoint for an Amazon FSx for NetApp ONTAP file system that DataSync
* 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>
*/
public createLocationFsxOntap(
args: CreateLocationFsxOntapCommandInput,
options?: __HttpHandlerOptions
): Promise<CreateLocationFsxOntapCommandOutput>;
public createLocationFsxOntap(
args: CreateLocationFsxOntapCommandInput,
cb: (err: any, data?: CreateLocationFsxOntapCommandOutput) => void
): void;
public createLocationFsxOntap(
args: CreateLocationFsxOntapCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: CreateLocationFsxOntapCommandOutput) => void
): void;
public createLocationFsxOntap(
args: CreateLocationFsxOntapCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationFsxOntapCommandOutput) => void),
cb?: (err: any, data?: CreateLocationFsxOntapCommandOutput) => void
): Promise<CreateLocationFsxOntapCommandOutput> | void {
const command = new CreateLocationFsxOntapCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Creates an endpoint for an Amazon FSx for OpenZFS file system.</p>
*/
Expand Down Expand Up @@ -461,8 +504,7 @@ export class DataSync extends DataSyncClient {
}

/**
* <p>Creates an endpoint for a self-managed object storage bucket. For more information
* 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>
* <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>
*/
public createLocationObjectStorage(
args: CreateLocationObjectStorageCommandInput,
Expand Down Expand Up @@ -794,6 +836,38 @@ export class DataSync extends DataSyncClient {
}
}

/**
* <p>Provides details about how an DataSync location for an Amazon FSx for NetApp ONTAP file system is configured.</p>
*/
public describeLocationFsxOntap(
args: DescribeLocationFsxOntapCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeLocationFsxOntapCommandOutput>;
public describeLocationFsxOntap(
args: DescribeLocationFsxOntapCommandInput,
cb: (err: any, data?: DescribeLocationFsxOntapCommandOutput) => void
): void;
public describeLocationFsxOntap(
args: DescribeLocationFsxOntapCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeLocationFsxOntapCommandOutput) => void
): void;
public describeLocationFsxOntap(
args: DescribeLocationFsxOntapCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationFsxOntapCommandOutput) => void),
cb?: (err: any, data?: DescribeLocationFsxOntapCommandOutput) => void
): Promise<DescribeLocationFsxOntapCommandOutput> | void {
const command = new DescribeLocationFsxOntapCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Returns metadata about an Amazon FSx for OpenZFS
* location, such as information about its path.</p>
Expand Down Expand Up @@ -926,8 +1000,7 @@ export class DataSync extends DataSyncClient {
}

/**
* <p>Returns metadata about a self-managed object storage server location. For more information
* 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>
* <p>Returns metadata about your DataSync location for an object storage system.</p>
*/
public describeLocationObjectStorage(
args: DescribeLocationObjectStorageCommandInput,
Expand Down
12 changes: 12 additions & 0 deletions clients/client-datasync/src/DataSyncClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ import {
CreateLocationFsxLustreCommandInput,
CreateLocationFsxLustreCommandOutput,
} from "./commands/CreateLocationFsxLustreCommand";
import {
CreateLocationFsxOntapCommandInput,
CreateLocationFsxOntapCommandOutput,
} from "./commands/CreateLocationFsxOntapCommand";
import {
CreateLocationFsxOpenZfsCommandInput,
CreateLocationFsxOpenZfsCommandOutput,
Expand Down Expand Up @@ -92,6 +96,10 @@ import {
DescribeLocationFsxLustreCommandInput,
DescribeLocationFsxLustreCommandOutput,
} from "./commands/DescribeLocationFsxLustreCommand";
import {
DescribeLocationFsxOntapCommandInput,
DescribeLocationFsxOntapCommandOutput,
} from "./commands/DescribeLocationFsxOntapCommand";
import {
DescribeLocationFsxOpenZfsCommandInput,
DescribeLocationFsxOpenZfsCommandOutput,
Expand Down Expand Up @@ -153,6 +161,7 @@ export type ServiceInputTypes =
| CreateAgentCommandInput
| CreateLocationEfsCommandInput
| CreateLocationFsxLustreCommandInput
| CreateLocationFsxOntapCommandInput
| CreateLocationFsxOpenZfsCommandInput
| CreateLocationFsxWindowsCommandInput
| CreateLocationHdfsCommandInput
Expand All @@ -167,6 +176,7 @@ export type ServiceInputTypes =
| DescribeAgentCommandInput
| DescribeLocationEfsCommandInput
| DescribeLocationFsxLustreCommandInput
| DescribeLocationFsxOntapCommandInput
| DescribeLocationFsxOpenZfsCommandInput
| DescribeLocationFsxWindowsCommandInput
| DescribeLocationHdfsCommandInput
Expand Down Expand Up @@ -197,6 +207,7 @@ export type ServiceOutputTypes =
| CreateAgentCommandOutput
| CreateLocationEfsCommandOutput
| CreateLocationFsxLustreCommandOutput
| CreateLocationFsxOntapCommandOutput
| CreateLocationFsxOpenZfsCommandOutput
| CreateLocationFsxWindowsCommandOutput
| CreateLocationHdfsCommandOutput
Expand All @@ -211,6 +222,7 @@ export type ServiceOutputTypes =
| DescribeAgentCommandOutput
| DescribeLocationEfsCommandOutput
| DescribeLocationFsxLustreCommandOutput
| DescribeLocationFsxOntapCommandOutput
| DescribeLocationFsxOpenZfsCommandOutput
| DescribeLocationFsxWindowsCommandOutput
| DescribeLocationHdfsCommandOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient";
import { CreateLocationFsxOntapRequest, CreateLocationFsxOntapResponse } from "../models/models_0";
import {
deserializeAws_json1_1CreateLocationFsxOntapCommand,
serializeAws_json1_1CreateLocationFsxOntapCommand,
} from "../protocols/Aws_json1_1";

export interface CreateLocationFsxOntapCommandInput extends CreateLocationFsxOntapRequest {}
export interface CreateLocationFsxOntapCommandOutput extends CreateLocationFsxOntapResponse, __MetadataBearer {}

/**
* <p>Creates an endpoint for an Amazon FSx for NetApp ONTAP file system that DataSync
* 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>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { DataSyncClient, CreateLocationFsxOntapCommand } from "@aws-sdk/client-datasync"; // ES Modules import
* // const { DataSyncClient, CreateLocationFsxOntapCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
* const client = new DataSyncClient(config);
* const command = new CreateLocationFsxOntapCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link CreateLocationFsxOntapCommandInput} for command's `input` shape.
* @see {@link CreateLocationFsxOntapCommandOutput} for command's `response` shape.
* @see {@link DataSyncClientResolvedConfig | config} for DataSyncClient's `config` shape.
*
*/
export class CreateLocationFsxOntapCommand extends $Command<
CreateLocationFsxOntapCommandInput,
CreateLocationFsxOntapCommandOutput,
DataSyncClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: CreateLocationFsxOntapCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: DataSyncClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CreateLocationFsxOntapCommandInput, CreateLocationFsxOntapCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "DataSyncClient";
const commandName = "CreateLocationFsxOntapCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: CreateLocationFsxOntapRequest.filterSensitiveLog,
outputFilterSensitiveLog: CreateLocationFsxOntapResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: CreateLocationFsxOntapCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1CreateLocationFsxOntapCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CreateLocationFsxOntapCommandOutput> {
return deserializeAws_json1_1CreateLocationFsxOntapCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export interface CreateLocationObjectStorageCommandOutput
__MetadataBearer {}

/**
* <p>Creates an endpoint for a self-managed object storage bucket. For more information
* 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>
* <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>
* @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
@@ -0,0 +1,96 @@
// smithy-typescript generated code
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import { DataSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../DataSyncClient";
import { DescribeLocationFsxOntapRequest, DescribeLocationFsxOntapResponse } from "../models/models_0";
import {
deserializeAws_json1_1DescribeLocationFsxOntapCommand,
serializeAws_json1_1DescribeLocationFsxOntapCommand,
} from "../protocols/Aws_json1_1";

export interface DescribeLocationFsxOntapCommandInput extends DescribeLocationFsxOntapRequest {}
export interface DescribeLocationFsxOntapCommandOutput extends DescribeLocationFsxOntapResponse, __MetadataBearer {}

/**
* <p>Provides details about how an DataSync location for an Amazon FSx for NetApp ONTAP file system is configured.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { DataSyncClient, DescribeLocationFsxOntapCommand } from "@aws-sdk/client-datasync"; // ES Modules import
* // const { DataSyncClient, DescribeLocationFsxOntapCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
* const client = new DataSyncClient(config);
* const command = new DescribeLocationFsxOntapCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link DescribeLocationFsxOntapCommandInput} for command's `input` shape.
* @see {@link DescribeLocationFsxOntapCommandOutput} for command's `response` shape.
* @see {@link DataSyncClientResolvedConfig | config} for DataSyncClient's `config` shape.
*
*/
export class DescribeLocationFsxOntapCommand extends $Command<
DescribeLocationFsxOntapCommandInput,
DescribeLocationFsxOntapCommandOutput,
DataSyncClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

constructor(readonly input: DescribeLocationFsxOntapCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: DataSyncClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DescribeLocationFsxOntapCommandInput, DescribeLocationFsxOntapCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "DataSyncClient";
const commandName = "DescribeLocationFsxOntapCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: DescribeLocationFsxOntapRequest.filterSensitiveLog,
outputFilterSensitiveLog: DescribeLocationFsxOntapResponse.filterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: DescribeLocationFsxOntapCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DescribeLocationFsxOntapCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DescribeLocationFsxOntapCommandOutput> {
return deserializeAws_json1_1DescribeLocationFsxOntapCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export interface DescribeLocationObjectStorageCommandOutput
__MetadataBearer {}

/**
* <p>Returns metadata about a self-managed object storage server location. For more information
* 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>
* <p>Returns metadata about your DataSync location for an object storage system.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Loading

0 comments on commit 87a3aac

Please sign in to comment.