Skip to content

Commit

Permalink
feat(client-appflow): Added ability to select DataTransferApiType for…
Browse files Browse the repository at this point in the history
… DescribeConnector and CreateFlow requests when using Async supported connectors. Added supportedDataTransferType to DescribeConnector/DescribeConnectors/ListConnector response.
  • Loading branch information
awstools committed Jun 1, 2023
1 parent 0c7b812 commit 35366f2
Show file tree
Hide file tree
Showing 9 changed files with 261 additions and 3 deletions.
4 changes: 4 additions & 0 deletions clients/client-appflow/src/commands/CreateFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
* customProperties: { // CustomProperties
* "<keys>": "STRING_VALUE",
* },
* dataTransferApi: { // DataTransferApi
* Name: "STRING_VALUE",
* Type: "SYNC" || "ASYNC" || "AUTOMATIC",
* },
* },
* Pardot: { // PardotSourceProperties
* object: "STRING_VALUE", // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,15 @@ export interface DescribeConnectorCommandOutput extends DescribeConnectorRespons
* // logoURL: "STRING_VALUE",
* // registeredAt: new Date("TIMESTAMP"),
* // registeredBy: "STRING_VALUE",
* // supportedDataTransferTypes: [ // SupportedDataTransferTypeList
* // "RECORD" || "FILE",
* // ],
* // supportedDataTransferApis: [ // SupportedDataTransferApis
* // { // DataTransferApi
* // Name: "STRING_VALUE",
* // Type: "SYNC" || "ASYNC" || "AUTOMATIC",
* // },
* // ],
* // },
* // };
*
Expand Down
12 changes: 12 additions & 0 deletions clients/client-appflow/src/commands/DescribeConnectorsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,15 @@ export interface DescribeConnectorsCommandOutput extends DescribeConnectorsRespo
* // logoURL: "STRING_VALUE",
* // registeredAt: new Date("TIMESTAMP"),
* // registeredBy: "STRING_VALUE",
* // supportedDataTransferTypes: [ // SupportedDataTransferTypeList
* // "RECORD" || "FILE",
* // ],
* // supportedDataTransferApis: [ // SupportedDataTransferApis
* // { // DataTransferApi
* // Name: "STRING_VALUE",
* // Type: "SYNC" || "ASYNC" || "AUTOMATIC",
* // },
* // ],
* // },
* // },
* // connectors: [ // ConnectorList
Expand All @@ -231,6 +240,9 @@ export interface DescribeConnectorsCommandOutput extends DescribeConnectorsRespo
* // connectorModes: [
* // "STRING_VALUE",
* // ],
* // supportedDataTransferTypes: [
* // "RECORD" || "FILE",
* // ],
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
4 changes: 4 additions & 0 deletions clients/client-appflow/src/commands/DescribeFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ export interface DescribeFlowCommandOutput extends DescribeFlowResponse, __Metad
* // customProperties: { // CustomProperties
* // "<keys>": "STRING_VALUE",
* // },
* // dataTransferApi: { // DataTransferApi
* // Name: "STRING_VALUE",
* // Type: "SYNC" || "ASYNC" || "AUTOMATIC",
* // },
* // },
* // Pardot: { // PardotSourceProperties
* // object: "STRING_VALUE", // required
Expand Down
3 changes: 3 additions & 0 deletions clients/client-appflow/src/commands/ListConnectorsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ export interface ListConnectorsCommandOutput extends ListConnectorsResponse, __M
* // connectorModes: [ // ConnectorModeList
* // "STRING_VALUE",
* // ],
* // supportedDataTransferTypes: [ // SupportedDataTransferTypeList
* // "RECORD" || "FILE",
* // ],
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
4 changes: 4 additions & 0 deletions clients/client-appflow/src/commands/UpdateFlowCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ export interface UpdateFlowCommandOutput extends UpdateFlowResponse, __MetadataB
* customProperties: { // CustomProperties
* "<keys>": "STRING_VALUE",
* },
* dataTransferApi: { // DataTransferApi
* Name: "STRING_VALUE",
* Type: "SYNC" || "ASYNC" || "AUTOMATIC",
* },
* },
* Pardot: { // PardotSourceProperties
* object: "STRING_VALUE", // required
Expand Down
108 changes: 106 additions & 2 deletions clients/client-appflow/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,8 @@ export interface SalesforceMetadata {

/**
* <p>The OAuth 2.0 grant types that Amazon AppFlow can use when it requests an access
* token from Salesforce. Amazon AppFlow requires an access token each time it
* attempts to access your Salesforce records.</p>
* token from Salesforce. Amazon AppFlow requires an access token each time it attempts to
* access your Salesforce records.</p>
* <dl>
* <dt>AUTHORIZATION_CODE</dt>
* <dd>
Expand Down Expand Up @@ -969,6 +969,68 @@ export const ConnectorType = {
*/
export type ConnectorType = (typeof ConnectorType)[keyof typeof ConnectorType];

/**
* @public
* @enum
*/
export const DataTransferApiType = {
ASYNC: "ASYNC",
AUTOMATIC: "AUTOMATIC",
SYNC: "SYNC",
} as const;

/**
* @public
*/
export type DataTransferApiType = (typeof DataTransferApiType)[keyof typeof DataTransferApiType];

/**
* @public
* <p>The API of the connector application that Amazon AppFlow uses to transfer your
* data.</p>
*/
export interface DataTransferApi {
/**
* <p>The name of the connector application API.</p>
*/
Name?: string;

/**
* <p>You can specify one of the following types:</p>
* <dl>
* <dt>AUTOMATIC</dt>
* <dd>
* <p>The default. Optimizes a flow for datasets that fluctuate in size from small to
* large. For each flow run, Amazon AppFlow chooses to use the SYNC or ASYNC API type based on
* the amount of data that the run transfers.</p>
* </dd>
* <dt>SYNC</dt>
* <dd>
* <p>A synchronous API. This type of API optimizes a flow for small to medium-sized datasets.</p>
* </dd>
* <dt>ASYNC</dt>
* <dd>
* <p>An asynchronous API. This type of API optimizes a flow for large datasets.</p>
* </dd>
* </dl>
*/
Type?: DataTransferApiType | string;
}

/**
* @public
* @enum
*/
export const SupportedDataTransferType = {
FILE: "FILE",
RECORD: "RECORD",
} as const;

/**
* @public
*/
export type SupportedDataTransferType = (typeof SupportedDataTransferType)[keyof typeof SupportedDataTransferType];

/**
* @public
* @enum
Expand Down Expand Up @@ -1186,6 +1248,27 @@ export interface ConnectorConfiguration {
* <p>Information about who registered the connector.</p>
*/
registeredBy?: string;

/**
* <p>The data transfer types that the connector supports.</p>
* <dl>
* <dt>RECORD</dt>
* <dd>
* <p>Structured records.</p>
* </dd>
* <dt>FILE</dt>
* <dd>
* <p>Files or binary data.</p>
* </dd>
* </dl>
*/
supportedDataTransferTypes?: (SupportedDataTransferType | string)[];

/**
* <p>The APIs of the connector application that Amazon AppFlow can use to transfer your
* data.</p>
*/
supportedDataTransferApis?: DataTransferApi[];
}

/**
Expand Down Expand Up @@ -1247,6 +1330,21 @@ export interface ConnectorDetail {
* <p>The connection mode that the connector supports.</p>
*/
connectorModes?: string[];

/**
* <p>The data transfer types that the connector supports.</p>
* <dl>
* <dt>RECORD</dt>
* <dd>
* <p>Structured records.</p>
* </dd>
* <dt>FILE</dt>
* <dd>
* <p>Files or binary data.</p>
* </dd>
* </dl>
*/
supportedDataTransferTypes?: (SupportedDataTransferType | string)[];
}

/**
Expand Down Expand Up @@ -4180,6 +4278,12 @@ export interface CustomConnectorSourceProperties {
* <p>Custom properties that are required to use the custom connector as a source.</p>
*/
customProperties?: Record<string, string>;

/**
* <p>The API of the connector application that Amazon AppFlow uses to transfer your
* data.</p>
*/
dataTransferApi?: DataTransferApi;
}

/**
Expand Down
12 changes: 12 additions & 0 deletions clients/client-appflow/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ import {
DatadogConnectorProfileCredentials,
DatadogConnectorProfileProperties,
DatadogSourceProperties,
DataTransferApi,
DestinationConnectorProperties,
DestinationFlowConfig,
DynatraceConnectorProfileCredentials,
Expand Down Expand Up @@ -2566,6 +2567,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont

// se_DatadogSourceProperties omitted.

// se_DataTransferApi omitted.

// se_DestinationConnectorProperties omitted.

// se_DestinationFlowConfig omitted.
Expand Down Expand Up @@ -2817,6 +2820,8 @@ const de_ConnectorConfiguration = (output: any, context: __SerdeContext): Connec
registeredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
registeredBy: __expectString,
supportedApiVersions: _json,
supportedDataTransferApis: _json,
supportedDataTransferTypes: _json,
supportedDestinationConnectors: _json,
supportedOperators: _json,
supportedSchedulingFrequencies: _json,
Expand Down Expand Up @@ -2860,6 +2865,7 @@ const de_ConnectorDetail = (output: any, context: __SerdeContext): ConnectorDeta
connectorVersion: __expectString,
registeredAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
registeredBy: __expectString,
supportedDataTransferTypes: _json,
}) as any;
};

Expand Down Expand Up @@ -2984,6 +2990,8 @@ const de_ConnectorProfileDetailList = (output: any, context: __SerdeContext): Co

// de_DatadogSourceProperties omitted.

// de_DataTransferApi omitted.

// de_DestinationConnectorProperties omitted.

// de_DestinationFieldProperties omitted.
Expand Down Expand Up @@ -3273,6 +3281,10 @@ const de_ScheduledTriggerProperties = (output: any, context: __SerdeContext): Sc

// de_SupportedApiVersionList omitted.

// de_SupportedDataTransferApis omitted.

// de_SupportedDataTransferTypeList omitted.

/**
* deserializeAws_restJson1SupportedFieldTypeDetails
*/
Expand Down
Loading

0 comments on commit 35366f2

Please sign in to comment.