Skip to content

Commit

Permalink
feat(client-glue): Fix DirectJDBCSource not showing up in CLI code gen
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Feb 15, 2023
1 parent afee763 commit bedba23
Show file tree
Hide file tree
Showing 9 changed files with 640 additions and 418 deletions.
8 changes: 6 additions & 2 deletions clients/client-glue/src/commands/CreateScriptCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import {
} from "@aws-sdk/types";

import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
import { CreateScriptRequest, CreateScriptRequestFilterSensitiveLog } from "../models/models_0";
import { CreateScriptResponse, CreateScriptResponseFilterSensitiveLog } from "../models/models_1";
import {
CreateScriptRequest,
CreateScriptRequestFilterSensitiveLog,
CreateScriptResponse,
CreateScriptResponseFilterSensitiveLog,
} from "../models/models_1";
import {
deserializeAws_json1_1CreateScriptCommand,
serializeAws_json1_1CreateScriptCommand,
Expand Down
8 changes: 6 additions & 2 deletions clients/client-glue/src/commands/ListCrawlsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ import {
} from "@aws-sdk/types";

import { GlueClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../GlueClient";
import { ListCrawlsRequest, ListCrawlsRequestFilterSensitiveLog } from "../models/models_1";
import { ListCrawlsResponse, ListCrawlsResponseFilterSensitiveLog } from "../models/models_2";
import {
ListCrawlsRequest,
ListCrawlsRequestFilterSensitiveLog,
ListCrawlsResponse,
ListCrawlsResponseFilterSensitiveLog,
} from "../models/models_2";
import {
deserializeAws_json1_1ListCrawlsCommand,
serializeAws_json1_1ListCrawlsCommand,
Expand Down
2 changes: 1 addition & 1 deletion clients/client-glue/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-glue/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/glue.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:[{type:e,rules:[{endpoint:{url:"https://glue-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://glue-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:[{type:e,rules:[{endpoint:{url:"https://glue.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://glue.{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://glue-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://glue-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://glue.{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://glue.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;
79 changes: 50 additions & 29 deletions clients/client-glue/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2339,6 +2339,49 @@ export interface CustomCode {
OutputSchemas?: GlueSchema[];
}

export enum JDBCConnectionType {
mysql = "mysql",
oracle = "oracle",
postgresql = "postgresql",
redshift = "redshift",
sqlserver = "sqlserver",
}

/**
* <p>Specifies the direct JDBC source connection.</p>
*/
export interface DirectJDBCSource {
/**
* <p>The name of the JDBC source connection.</p>
*/
Name: string | undefined;

/**
* <p>The database of the JDBC source connection.</p>
*/
Database: string | undefined;

/**
* <p>The table of the JDBC source connection.</p>
*/
Table: string | undefined;

/**
* <p>The connection name of the JDBC source.</p>
*/
ConnectionName: string | undefined;

/**
* <p>The connection type of the JDBC source.</p>
*/
ConnectionType: JDBCConnectionType | string | undefined;

/**
* <p>The temp directory of the JDBC Redshift source.</p>
*/
RedshiftTmpDir?: string;
}

/**
* <p>Specifies an Apache Kafka data store.</p>
*/
Expand Down Expand Up @@ -7122,28 +7165,6 @@ export interface CodeGenNode {
LineNumber?: number;
}

export enum Language {
PYTHON = "PYTHON",
SCALA = "SCALA",
}

export interface CreateScriptRequest {
/**
* <p>A list of the nodes in the DAG.</p>
*/
DagNodes?: CodeGenNode[];

/**
* <p>A list of the edges in the DAG.</p>
*/
DagEdges?: CodeGenEdge[];

/**
* <p>The programming language of the resulting code from the DAG.</p>
*/
Language?: Language | string;
}

/**
* @internal
*/
Expand Down Expand Up @@ -7655,6 +7676,13 @@ export const CustomCodeFilterSensitiveLog = (obj: CustomCode): any => ({
...obj,
});

/**
* @internal
*/
export const DirectJDBCSourceFilterSensitiveLog = (obj: DirectJDBCSource): any => ({
...obj,
});

/**
* @internal
*/
Expand Down Expand Up @@ -8770,10 +8798,3 @@ export const CodeGenNodeArgFilterSensitiveLog = (obj: CodeGenNodeArg): any => ({
export const CodeGenNodeFilterSensitiveLog = (obj: CodeGenNode): any => ({
...obj,
});

/**
* @internal
*/
export const CreateScriptRequestFilterSensitiveLog = (obj: CreateScriptRequest): any => ({
...obj,
});
124 changes: 26 additions & 98 deletions clients/client-glue/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
EventBatchingCondition,
GlueTable,
JobRun,
Language,
Partition,
PartitionIndex,
PartitionValueList,
Expand All @@ -48,6 +47,28 @@ import {
WorkflowRun,
} from "./models_0";

export enum Language {
PYTHON = "PYTHON",
SCALA = "SCALA",
}

export interface CreateScriptRequest {
/**
* <p>A list of the nodes in the DAG.</p>
*/
DagNodes?: CodeGenNode[];

/**
* <p>A list of the edges in the DAG.</p>
*/
DagEdges?: CodeGenEdge[];

/**
* <p>The programming language of the resulting code from the DAG.</p>
*/
Language?: Language | string;
}

export interface CreateScriptResponse {
/**
* <p>The Python script generated from the DAG.</p>
Expand Down Expand Up @@ -5812,90 +5833,11 @@ export enum FilterOperator {
}

/**
* <p>A list of fields, comparators and value that you can use to filter the crawler runs for a specified crawler.</p>
* @internal
*/
export interface CrawlsFilter {
/**
* <p>A key used to filter the crawler runs for a specified crawler. Valid values for each of the field names are:</p>
* <ul>
* <li>
* <p>
* <code>CRAWL_ID</code>: A string representing the UUID identifier for a crawl.</p>
* </li>
* <li>
* <p>
* <code>STATE</code>: A string representing the state of the crawl.</p>
* </li>
* <li>
* <p>
* <code>START_TIME</code> and <code>END_TIME</code>: The epoch timestamp in milliseconds.</p>
* </li>
* <li>
* <p>
* <code>DPU_HOUR</code>: The number of data processing unit (DPU) hours used for the crawl.</p>
* </li>
* </ul>
*/
FieldName?: FieldName | string;

/**
* <p>A defined comparator that operates on the value. The available operators are:</p>
* <ul>
* <li>
* <p>
* <code>GT</code>: Greater than.</p>
* </li>
* <li>
* <p>
* <code>GE</code>: Greater than or equal to.</p>
* </li>
* <li>
* <p>
* <code>LT</code>: Less than.</p>
* </li>
* <li>
* <p>
* <code>LE</code>: Less than or equal to.</p>
* </li>
* <li>
* <p>
* <code>EQ</code>: Equal to.</p>
* </li>
* <li>
* <p>
* <code>NE</code>: Not equal to.</p>
* </li>
* </ul>
*/
FilterOperator?: FilterOperator | string;

/**
* <p>The value provided for comparison on the crawl field. </p>
*/
FieldValue?: string;
}

export interface ListCrawlsRequest {
/**
* <p>The name of the crawler whose runs you want to retrieve.</p>
*/
CrawlerName: string | undefined;

/**
* <p>The maximum number of results to return. The default is 20, and maximum is 100.</p>
*/
MaxResults?: number;

/**
* <p>Filters the crawls by the criteria you specify in a list of <code>CrawlsFilter</code> objects.</p>
*/
Filters?: CrawlsFilter[];

/**
* <p>A continuation token, if this is a continuation call.</p>
*/
NextToken?: string;
}
export const CreateScriptRequestFilterSensitiveLog = (obj: CreateScriptRequest): any => ({
...obj,
});

/**
* @internal
Expand Down Expand Up @@ -7828,17 +7770,3 @@ export const ListCrawlersRequestFilterSensitiveLog = (obj: ListCrawlersRequest):
export const ListCrawlersResponseFilterSensitiveLog = (obj: ListCrawlersResponse): any => ({
...obj,
});

/**
* @internal
*/
export const CrawlsFilterFilterSensitiveLog = (obj: CrawlsFilter): any => ({
...obj,
});

/**
* @internal
*/
export const ListCrawlsRequestFilterSensitiveLog = (obj: ListCrawlsRequest): any => ({
...obj,
});
Loading

0 comments on commit bedba23

Please sign in to comment.