Skip to content

Commit a8ed592

Browse files
author
awstools
committed
feat(client-athena): Introducing new NotebookS3LocationUri parameter to Athena ImportNotebook API. Payload is no longer required and either Payload or NotebookS3LocationUri needs to be provided (not both) for a successful ImportNotebook API call. If both are provided, an InvalidRequestException will be thrown.
1 parent 5d26da6 commit a8ed592

File tree

3 files changed

+44
-30
lines changed

3 files changed

+44
-30
lines changed

clients/client-athena/src/commands/ImportNotebookCommand.ts

+7-4
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ export interface ImportNotebookCommandOutput extends ImportNotebookOutput, __Met
2828

2929
/**
3030
* @public
31-
* <p>Imports a single <code>ipynb</code> file to a Spark enabled workgroup. The maximum
32-
* file size that can be imported is 10 megabytes. If an <code>ipynb</code> file with the
33-
* same name already exists in the workgroup, throws an error.</p>
31+
* <p>Imports a single <code>ipynb</code> file to a Spark enabled workgroup. To import the
32+
* notebook, the request must specify a value for either <code>Payload</code> or <code>NoteBookS3LocationUri</code>. If neither is specified or both are specified, an
33+
* <code>InvalidRequestException</code> occurs. The maximum file size that can be imported is 10
34+
* megabytes. If an <code>ipynb</code> file with the same name already exists in the
35+
* workgroup, throws an error.</p>
3436
* @example
3537
* Use a bare-bones client and the command you need to make an API call.
3638
* ```javascript
@@ -40,8 +42,9 @@ export interface ImportNotebookCommandOutput extends ImportNotebookOutput, __Met
4042
* const input = { // ImportNotebookInput
4143
* WorkGroup: "STRING_VALUE", // required
4244
* Name: "STRING_VALUE", // required
43-
* Payload: "STRING_VALUE", // required
45+
* Payload: "STRING_VALUE",
4446
* Type: "IPYNB", // required
47+
* NotebookS3LocationUri: "STRING_VALUE",
4548
* ClientRequestToken: "STRING_VALUE",
4649
* };
4750
* const command = new ImportNotebookCommand(input);

clients/client-athena/src/models/models_0.ts

+23-17
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,8 @@ export interface QueryExecutionStatistics {
608608

609609
/**
610610
* @public
611-
* <p>The number of milliseconds that Athena took to preprocess the query before submitting the query to the query engine.</p>
611+
* <p>The number of milliseconds that Athena took to preprocess the query before
612+
* submitting the query to the query engine.</p>
612613
*/
613614
ServicePreProcessingTimeInMillis?: number;
614615

@@ -1422,9 +1423,10 @@ export interface WorkGroupConfiguration {
14221423

14231424
/**
14241425
* @public
1425-
* <p>The ARN of the execution role used to access user resources for Spark sessions and Identity Center
1426-
* enabled workgroups. This property applies only to Spark enabled workgroups and Identity
1427-
* Center enabled workgroups.</p>
1426+
* <p>The ARN of the execution role used to access user resources for Spark sessions and
1427+
* IAM Identity Center enabled workgroups. This property applies only to Spark enabled
1428+
* workgroups and IAM Identity Center enabled workgroups. The property is required for
1429+
* IAM Identity Center enabled workgroups.</p>
14281430
*/
14291431
ExecutionRole?: string;
14301432

@@ -2673,9 +2675,8 @@ export interface QueryRuntimeStatisticsTimeline {
26732675

26742676
/**
26752677
* @public
2676-
* <p>
2677-
* The number of milliseconds that Athena spends on preprocessing before it submits the query to the engine.
2678-
* </p>
2678+
* <p> The number of milliseconds that Athena spends on preprocessing before it
2679+
* submits the query to the engine. </p>
26792680
*/
26802681
ServicePreProcessingTimeInMillis?: number;
26812682

@@ -2772,9 +2773,9 @@ export interface EngineConfiguration {
27722773
export interface SessionConfiguration {
27732774
/**
27742775
* @public
2775-
* <p>The ARN of the execution role used to access user resources for Spark sessions and Identity Center
2776-
* enabled workgroups. This property applies only to Spark enabled workgroups and Identity
2777-
* Center enabled workgroups.</p>
2776+
* <p>The ARN of the execution role used to access user resources for Spark sessions and
2777+
* Identity Center enabled workgroups. This property applies only to Spark enabled
2778+
* workgroups and Identity Center enabled workgroups.</p>
27782779
*/
27792780
ExecutionRole?: string;
27802781

@@ -3207,9 +3208,9 @@ export interface ImportNotebookInput {
32073208

32083209
/**
32093210
* @public
3210-
* <p>The notebook content to be imported.</p>
3211+
* <p>The notebook content to be imported. The payload must be in <code>ipynb</code> format.</p>
32113212
*/
3212-
Payload: string | undefined;
3213+
Payload?: string;
32133214

32143215
/**
32153216
* @public
@@ -3218,6 +3219,12 @@ export interface ImportNotebookInput {
32183219
*/
32193220
Type: NotebookType | undefined;
32203221

3222+
/**
3223+
* @public
3224+
* <p>A URI that specifies the Amazon S3 location of a notebook file in <code>ipynb</code> format.</p>
3225+
*/
3226+
NotebookS3LocationUri?: string;
3227+
32213228
/**
32223229
* @public
32233230
* <p>A unique case-sensitive string used to ensure the request to import the notebook is
@@ -3500,8 +3507,7 @@ export interface ListDataCatalogsInput {
35003507

35013508
/**
35023509
* @public
3503-
* <p>The name of the workgroup. Required if
3504-
* making an IAM Identity Center request.</p>
3510+
* <p>The name of the workgroup. Required if making an IAM Identity Center request.</p>
35053511
*/
35063512
WorkGroup?: string;
35073513
}
@@ -5185,9 +5191,9 @@ export interface WorkGroupConfigurationUpdates {
51855191

51865192
/**
51875193
* @public
5188-
* <p>The ARN of the execution role used to access user resources for Spark sessions and Identity Center
5189-
* enabled workgroups. This property applies only to Spark enabled workgroups and Identity
5190-
* Center enabled workgroups.</p>
5194+
* <p>The ARN of the execution role used to access user resources for Spark sessions and
5195+
* Identity Center enabled workgroups. This property applies only to Spark enabled
5196+
* workgroups and Identity Center enabled workgroups.</p>
51915197
*/
51925198
ExecutionRole?: string;
51935199

codegen/sdk-codegen/aws-models/athena.json

+14-9
Original file line numberDiff line numberDiff line change
@@ -4568,7 +4568,7 @@
45684568
}
45694569
],
45704570
"traits": {
4571-
"smithy.api#documentation": "<p>Imports a single <code>ipynb</code> file to a Spark enabled workgroup. The maximum\n file size that can be imported is 10 megabytes. If an <code>ipynb</code> file with the\n same name already exists in the workgroup, throws an error.</p>"
4571+
"smithy.api#documentation": "<p>Imports a single <code>ipynb</code> file to a Spark enabled workgroup. To import the\n notebook, the request must specify a value for either <code>Payload</code> or <code>NoteBookS3LocationUri</code>. If neither is specified or both are specified, an\n <code>InvalidRequestException</code> occurs. The maximum file size that can be imported is 10\n megabytes. If an <code>ipynb</code> file with the same name already exists in the\n workgroup, throws an error.</p>"
45724572
}
45734573
},
45744574
"com.amazonaws.athena#ImportNotebookInput": {
@@ -4591,8 +4591,7 @@
45914591
"Payload": {
45924592
"target": "com.amazonaws.athena#Payload",
45934593
"traits": {
4594-
"smithy.api#documentation": "<p>The notebook content to be imported.</p>",
4595-
"smithy.api#required": {}
4594+
"smithy.api#documentation": "<p>The notebook content to be imported. The payload must be in <code>ipynb</code> format.</p>"
45964595
}
45974596
},
45984597
"Type": {
@@ -4602,6 +4601,12 @@
46024601
"smithy.api#required": {}
46034602
}
46044603
},
4604+
"NotebookS3LocationUri": {
4605+
"target": "com.amazonaws.athena#S3Uri",
4606+
"traits": {
4607+
"smithy.api#documentation": "<p>A URI that specifies the Amazon S3 location of a notebook file in <code>ipynb</code> format.</p>"
4608+
}
4609+
},
46054610
"ClientRequestToken": {
46064611
"target": "com.amazonaws.athena#ClientRequestToken",
46074612
"traits": {
@@ -4939,7 +4944,7 @@
49394944
"WorkGroup": {
49404945
"target": "com.amazonaws.athena#WorkGroupName",
49414946
"traits": {
4942-
"smithy.api#documentation": "<p>The name of the workgroup. Required if\n making an IAM Identity Center request.</p>"
4947+
"smithy.api#documentation": "<p>The name of the workgroup. Required if making an IAM Identity Center request.</p>"
49434948
}
49444949
}
49454950
},
@@ -6618,7 +6623,7 @@
66186623
"ServicePreProcessingTimeInMillis": {
66196624
"target": "com.amazonaws.athena#Long",
66206625
"traits": {
6621-
"smithy.api#documentation": "<p>The number of milliseconds that Athena took to preprocess the query before submitting the query to the query engine.</p>"
6626+
"smithy.api#documentation": "<p>The number of milliseconds that Athena took to preprocess the query before\n submitting the query to the query engine.</p>"
66226627
}
66236628
},
66246629
"QueryPlanningTimeInMillis": {
@@ -6774,7 +6779,7 @@
67746779
"ServicePreProcessingTimeInMillis": {
67756780
"target": "com.amazonaws.athena#Long",
67766781
"traits": {
6777-
"smithy.api#documentation": "<p>\n The number of milliseconds that Athena spends on preprocessing before it submits the query to the engine.\n </p>"
6782+
"smithy.api#documentation": "<p> The number of milliseconds that Athena spends on preprocessing before it\n submits the query to the engine. </p>"
67786783
}
67796784
},
67806785
"QueryPlanningTimeInMillis": {
@@ -7185,7 +7190,7 @@
71857190
"ExecutionRole": {
71867191
"target": "com.amazonaws.athena#RoleArn",
71877192
"traits": {
7188-
"smithy.api#documentation": "<p>The ARN of the execution role used to access user resources for Spark sessions and Identity Center\n enabled workgroups. This property applies only to Spark enabled workgroups and Identity\n Center enabled workgroups.</p>"
7193+
"smithy.api#documentation": "<p>The ARN of the execution role used to access user resources for Spark sessions and\n Identity Center enabled workgroups. This property applies only to Spark enabled\n workgroups and Identity Center enabled workgroups.</p>"
71897194
}
71907195
},
71917196
"WorkingDirectory": {
@@ -8757,7 +8762,7 @@
87578762
"ExecutionRole": {
87588763
"target": "com.amazonaws.athena#RoleArn",
87598764
"traits": {
8760-
"smithy.api#documentation": "<p>The ARN of the execution role used to access user resources for Spark sessions and Identity Center\n enabled workgroups. This property applies only to Spark enabled workgroups and Identity\n Center enabled workgroups.</p>"
8765+
"smithy.api#documentation": "<p>The ARN of the execution role used to access user resources for Spark sessions and\n IAM Identity Center enabled workgroups. This property applies only to Spark enabled\n workgroups and IAM Identity Center enabled workgroups. The property is required for\n IAM Identity Center enabled workgroups.</p>"
87618766
}
87628767
},
87638768
"CustomerContentEncryptionConfiguration": {
@@ -8849,7 +8854,7 @@
88498854
"ExecutionRole": {
88508855
"target": "com.amazonaws.athena#RoleArn",
88518856
"traits": {
8852-
"smithy.api#documentation": "<p>The ARN of the execution role used to access user resources for Spark sessions and Identity Center\n enabled workgroups. This property applies only to Spark enabled workgroups and Identity\n Center enabled workgroups.</p>"
8857+
"smithy.api#documentation": "<p>The ARN of the execution role used to access user resources for Spark sessions and\n Identity Center enabled workgroups. This property applies only to Spark enabled\n workgroups and Identity Center enabled workgroups.</p>"
88538858
}
88548859
},
88558860
"CustomerContentEncryptionConfiguration": {

0 commit comments

Comments
 (0)