Skip to content

Commit

Permalink
feat(client-neptune-graph): Update ImportTaskCancelled waiter to eval…
Browse files Browse the repository at this point in the history
…uate task state correctly and minor documentation changes.
  • Loading branch information
awstools committed Mar 28, 2024
1 parent 2f67543 commit 70254e2
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface CreateGraphCommandOutput extends CreateGraphOutput, __MetadataB
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // arn: "STRING_VALUE", // required
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED",
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED" || "IMPORTING",
* // statusReason: "STRING_VALUE",
* // createTime: new Date("TIMESTAMP"),
* // provisionedMemory: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export interface CreatePrivateGraphEndpointCommandOutput extends CreatePrivateGr

/**
* <p>Create a private graph endpoint to allow private access from to the graph from within
* a VPC. You can attach security groups to the private graph endpoint. VPC endpoint charges apply.</p>
* a VPC. You can attach security groups to the private graph endpoint.</p>
* <note>
* <p>VPC endpoint charges apply.</p>
* </note>
* @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
Expand Up @@ -44,7 +44,7 @@ export interface DeleteGraphCommandOutput extends DeleteGraphOutput, __MetadataB
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // arn: "STRING_VALUE", // required
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED",
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED" || "IMPORTING",
* // statusReason: "STRING_VALUE",
* // createTime: new Date("TIMESTAMP"),
* // provisionedMemory: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export interface ExecuteQueryCommandOutput extends Omit<ExecuteQueryOutput, "pay
}

/**
* <p>Execute an openCypher query. Currently, the SDK does not support parameterized queries. If you want to make a
* parameterized query call, you can use an HTTP request. </p>
* <p>Execute an openCypher query.</p>
* <p>
* When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have a policy attached
* that allows one of the following IAM actions in that cluster, depending on the query:
Expand All @@ -46,13 +45,6 @@ export interface ExecuteQueryCommandOutput extends Omit<ExecuteQueryOutput, "pay
* <p>neptune-graph:DeleteDataViaQuery</p>
* </li>
* </ul>
* <note>
* <p>
* Non-parametrized queries are not considered for plan caching. You can force plan caching with
* <code>planCache=enabled</code>. The plan cache will be reused only for the same exact query. Slight variations
* in the query will not be able to reuse the query plan cache.
* </p>
* </note>
* @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
Expand Up @@ -43,7 +43,7 @@ export interface GetGraphCommandOutput extends GetGraphOutput, __MetadataBearer
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // arn: "STRING_VALUE", // required
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED",
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED" || "IMPORTING",
* // statusReason: "STRING_VALUE",
* // createTime: new Date("TIMESTAMP"),
* // provisionedMemory: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface ListGraphsCommandOutput extends ListGraphsOutput, __MetadataBea
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // arn: "STRING_VALUE", // required
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED",
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED" || "IMPORTING",
* // provisionedMemory: Number("int"),
* // publicConnectivity: true || false,
* // endpoint: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface ResetGraphCommandOutput extends ResetGraphOutput, __MetadataBea
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // arn: "STRING_VALUE", // required
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED",
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED" || "IMPORTING",
* // statusReason: "STRING_VALUE",
* // createTime: new Date("TIMESTAMP"),
* // provisionedMemory: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface RestoreGraphFromSnapshotCommandOutput extends RestoreGraphFromS
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // arn: "STRING_VALUE", // required
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED",
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED" || "IMPORTING",
* // statusReason: "STRING_VALUE",
* // createTime: new Date("TIMESTAMP"),
* // provisionedMemory: Number("int"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface UpdateGraphCommandOutput extends UpdateGraphOutput, __MetadataB
* // id: "STRING_VALUE", // required
* // name: "STRING_VALUE", // required
* // arn: "STRING_VALUE", // required
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED",
* // status: "CREATING" || "AVAILABLE" || "DELETING" || "RESETTING" || "UPDATING" || "SNAPSHOTTING" || "FAILED" || "IMPORTING",
* // statusReason: "STRING_VALUE",
* // createTime: new Date("TIMESTAMP"),
* // provisionedMemory: Number("int"),
Expand Down
14 changes: 11 additions & 3 deletions clients/client-neptune-graph/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ export const GraphStatus = {
CREATING: "CREATING",
DELETING: "DELETING",
FAILED: "FAILED",
IMPORTING: "IMPORTING",
RESETTING: "RESETTING",
SNAPSHOTTING: "SNAPSHOTTING",
UPDATING: "UPDATING",
Expand Down Expand Up @@ -731,7 +732,8 @@ export interface CreateGraphOutput {
createTime?: Date;

/**
* <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 128</p>
* <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.</p>
* <p>Min = 128</p>
* @public
*/
provisionedMemory?: number;
Expand All @@ -744,6 +746,9 @@ export interface CreateGraphOutput {

/**
* <p>Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated.</p>
* <note>
* <p>If enabling public connectivity for the first time, there will be a delay while it is enabled.</p>
* </note>
* @public
*/
publicConnectivity?: boolean;
Expand All @@ -757,6 +762,7 @@ export interface CreateGraphOutput {

/**
* <p>The number of replicas in other AZs.</p>
* <p>Default: If not specified, the default value is 1.</p>
* @public
*/
replicaCount?: number;
Expand Down Expand Up @@ -1300,7 +1306,8 @@ export interface RestoreGraphFromSnapshotInput {
graphName: string | undefined;

/**
* <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 128</p>
* <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.</p>
* <p>Min = 128</p>
* @public
*/
provisionedMemory?: number;
Expand Down Expand Up @@ -1446,7 +1453,8 @@ export interface UpdateGraphInput {
publicConnectivity?: boolean;

/**
* <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 128</p>
* <p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.</p>
* <p>Min = 128</p>
* @public
*/
provisionedMemory?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const checkState = async (client: NeptuneGraphClient, input: GetImportTaskComman
reason = result;
try {
const returnComparator = () => {
return result.status != "CANCELLING";
return result.status != "CANCELLING" && result.status != "CANCELLED";
};
if (returnComparator() == true) {
return { state: WaiterState.FAILURE, reason };
Expand Down
22 changes: 14 additions & 8 deletions codegen/sdk-codegen/aws-models/neptune-graph.json
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,7 @@
"provisionedMemory": {
"target": "com.amazonaws.neptunegraph#ProvisionedMemory",
"traits": {
"smithy.api#documentation": "<p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 128</p>"
"smithy.api#documentation": "<p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.</p>\n <p>Min = 128</p>"
}
},
"endpoint": {
Expand All @@ -1896,7 +1896,7 @@
"publicConnectivity": {
"target": "smithy.api#Boolean",
"traits": {
"smithy.api#documentation": "<p>Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated.</p>"
"smithy.api#documentation": "<p>Specifies whether or not the graph can be reachable over the internet. All access to graphs is IAM authenticated.</p>\n <note>\n <p>If enabling public connectivity for the first time, there will be a delay while it is enabled.</p>\n </note>"
}
},
"vectorSearchConfiguration": {
Expand All @@ -1908,7 +1908,7 @@
"replicaCount": {
"target": "com.amazonaws.neptunegraph#ReplicaCount",
"traits": {
"smithy.api#documentation": "<p>The number of replicas in other AZs.</p>"
"smithy.api#documentation": "<p>The number of replicas in other AZs.</p>\n <p>Default: If not specified, the default value is 1.</p>"
}
},
"kmsKeyIdentifier": {
Expand Down Expand Up @@ -2283,7 +2283,7 @@
],
"traits": {
"aws.api#controlPlane": {},
"smithy.api#documentation": "<p>Create a private graph endpoint to allow private access from to the graph from within\n a VPC. You can attach security groups to the private graph endpoint. VPC endpoint charges apply.</p>",
"smithy.api#documentation": "<p>Create a private graph endpoint to allow private access from to the graph from within\n a VPC. You can attach security groups to the private graph endpoint.</p>\n <note>\n <p>VPC endpoint charges apply.</p>\n </note>",
"smithy.api#http": {
"code": 201,
"method": "POST",
Expand Down Expand Up @@ -2812,7 +2812,7 @@
],
"traits": {
"aws.api#dataPlane": {},
"smithy.api#documentation": "<p>Execute an openCypher query. Currently, the SDK does not support parameterized queries. If you want to make a \n parameterized query call, you can use an HTTP request. </p>\n <p>\n When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have a policy attached \n that allows one of the following IAM actions in that cluster, depending on the query:\n </p>\n <ul>\n <li>\n <p>neptune-graph:ReadDataViaQuery</p>\n </li>\n <li>\n <p>neptune-graph:WriteDataViaQuery</p>\n </li>\n <li>\n <p>neptune-graph:DeleteDataViaQuery</p>\n </li>\n </ul>\n <note>\n <p>\n Non-parametrized queries are not considered for plan caching. You can force plan caching with \n <code>planCache=enabled</code>. The plan cache will be reused only for the same exact query. Slight variations \n in the query will not be able to reuse the query plan cache.\n </p>\n </note>",
"smithy.api#documentation": "<p>Execute an openCypher query.</p>\n <p>\n When invoking this operation in a Neptune Analytics cluster, the IAM user or role making the request must have a policy attached \n that allows one of the following IAM actions in that cluster, depending on the query:\n </p>\n <ul>\n <li>\n <p>neptune-graph:ReadDataViaQuery</p>\n </li>\n <li>\n <p>neptune-graph:WriteDataViaQuery</p>\n </li>\n <li>\n <p>neptune-graph:DeleteDataViaQuery</p>\n </li>\n </ul>",
"smithy.api#endpoint": {
"hostPrefix": "{graphIdentifier}."
},
Expand Down Expand Up @@ -3516,7 +3516,7 @@
"state": "failure",
"matcher": {
"output": {
"path": "status != 'CANCELLING'",
"path": "status != 'CANCELLING' && status != 'CANCELLED'",
"expected": "true",
"comparator": "booleanEquals"
}
Expand Down Expand Up @@ -4134,6 +4134,12 @@
"traits": {
"smithy.api#enumValue": "FAILED"
}
},
"IMPORTING": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "IMPORTING"
}
}
}
},
Expand Down Expand Up @@ -5578,7 +5584,7 @@
"provisionedMemory": {
"target": "com.amazonaws.neptunegraph#ProvisionedMemory",
"traits": {
"smithy.api#documentation": "<p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 128</p>"
"smithy.api#documentation": "<p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.</p>\n <p>Min = 128</p>"
}
},
"deletionProtection": {
Expand Down Expand Up @@ -6202,7 +6208,7 @@
"provisionedMemory": {
"target": "com.amazonaws.neptunegraph#ProvisionedMemory",
"traits": {
"smithy.api#documentation": "<p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph. Min = 128</p>"
"smithy.api#documentation": "<p>The provisioned memory-optimized Neptune Capacity Units (m-NCUs) to use for the graph.</p>\n <p>Min = 128</p>"
}
},
"deletionProtection": {
Expand Down

0 comments on commit 70254e2

Please sign in to comment.