Skip to content

Commit af6b52c

Browse files
author
awstools
committed
feat(client-finspace-data): Release new API GetExternalDataViewAccessDetails
1 parent 9a71e60 commit af6b52c

File tree

7 files changed

+584
-6
lines changed

7 files changed

+584
-6
lines changed

clients/client-finspace-data/src/FinspaceData.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ import {
5151
} from "./commands/GetChangesetCommand";
5252
import { GetDatasetCommand, GetDatasetCommandInput, GetDatasetCommandOutput } from "./commands/GetDatasetCommand";
5353
import { GetDataViewCommand, GetDataViewCommandInput, GetDataViewCommandOutput } from "./commands/GetDataViewCommand";
54+
import {
55+
GetExternalDataViewAccessDetailsCommand,
56+
GetExternalDataViewAccessDetailsCommandInput,
57+
GetExternalDataViewAccessDetailsCommandOutput,
58+
} from "./commands/GetExternalDataViewAccessDetailsCommand";
5459
import {
5560
GetPermissionGroupCommand,
5661
GetPermissionGroupCommandInput,
@@ -540,6 +545,46 @@ export class FinspaceData extends FinspaceDataClient {
540545
}
541546
}
542547

548+
/**
549+
* <p>Returns the credentials to access the external Dataview from an S3 location. To call this API:</p>
550+
* <ul>
551+
* <li>
552+
* <p>You must retrieve the programmatic credentials.</p>
553+
* </li>
554+
* <li>
555+
* <p>You must be a member of a FinSpace user group, where the dataset that you want to access has <code>Read Dataset Data</code> permissions.</p>
556+
* </li>
557+
* </ul>
558+
*/
559+
public getExternalDataViewAccessDetails(
560+
args: GetExternalDataViewAccessDetailsCommandInput,
561+
options?: __HttpHandlerOptions
562+
): Promise<GetExternalDataViewAccessDetailsCommandOutput>;
563+
public getExternalDataViewAccessDetails(
564+
args: GetExternalDataViewAccessDetailsCommandInput,
565+
cb: (err: any, data?: GetExternalDataViewAccessDetailsCommandOutput) => void
566+
): void;
567+
public getExternalDataViewAccessDetails(
568+
args: GetExternalDataViewAccessDetailsCommandInput,
569+
options: __HttpHandlerOptions,
570+
cb: (err: any, data?: GetExternalDataViewAccessDetailsCommandOutput) => void
571+
): void;
572+
public getExternalDataViewAccessDetails(
573+
args: GetExternalDataViewAccessDetailsCommandInput,
574+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetExternalDataViewAccessDetailsCommandOutput) => void),
575+
cb?: (err: any, data?: GetExternalDataViewAccessDetailsCommandOutput) => void
576+
): Promise<GetExternalDataViewAccessDetailsCommandOutput> | void {
577+
const command = new GetExternalDataViewAccessDetailsCommand(args);
578+
if (typeof optionsOrCb === "function") {
579+
this.send(command, optionsOrCb);
580+
} else if (typeof cb === "function") {
581+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
582+
this.send(command, optionsOrCb || {}, cb);
583+
} else {
584+
return this.send(command, optionsOrCb);
585+
}
586+
}
587+
543588
/**
544589
* <p>Retrieves the details of a specific permission group.</p>
545590
*/

clients/client-finspace-data/src/FinspaceDataClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ import { EnableUserCommandInput, EnableUserCommandOutput } from "./commands/Enab
7979
import { GetChangesetCommandInput, GetChangesetCommandOutput } from "./commands/GetChangesetCommand";
8080
import { GetDatasetCommandInput, GetDatasetCommandOutput } from "./commands/GetDatasetCommand";
8181
import { GetDataViewCommandInput, GetDataViewCommandOutput } from "./commands/GetDataViewCommand";
82+
import {
83+
GetExternalDataViewAccessDetailsCommandInput,
84+
GetExternalDataViewAccessDetailsCommandOutput,
85+
} from "./commands/GetExternalDataViewAccessDetailsCommand";
8286
import { GetPermissionGroupCommandInput, GetPermissionGroupCommandOutput } from "./commands/GetPermissionGroupCommand";
8387
import {
8488
GetProgrammaticAccessCredentialsCommandInput,
@@ -127,6 +131,7 @@ export type ServiceInputTypes =
127131
| GetChangesetCommandInput
128132
| GetDataViewCommandInput
129133
| GetDatasetCommandInput
134+
| GetExternalDataViewAccessDetailsCommandInput
130135
| GetPermissionGroupCommandInput
131136
| GetProgrammaticAccessCredentialsCommandInput
132137
| GetUserCommandInput
@@ -159,6 +164,7 @@ export type ServiceOutputTypes =
159164
| GetChangesetCommandOutput
160165
| GetDataViewCommandOutput
161166
| GetDatasetCommandOutput
167+
| GetExternalDataViewAccessDetailsCommandOutput
162168
| GetPermissionGroupCommandOutput
163169
| GetProgrammaticAccessCredentialsCommandOutput
164170
| GetUserCommandOutput
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { FinspaceDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FinspaceDataClient";
16+
import { GetExternalDataViewAccessDetailsRequest, GetExternalDataViewAccessDetailsResponse } from "../models/models_0";
17+
import {
18+
deserializeAws_restJson1GetExternalDataViewAccessDetailsCommand,
19+
serializeAws_restJson1GetExternalDataViewAccessDetailsCommand,
20+
} from "../protocols/Aws_restJson1";
21+
22+
export interface GetExternalDataViewAccessDetailsCommandInput extends GetExternalDataViewAccessDetailsRequest {}
23+
export interface GetExternalDataViewAccessDetailsCommandOutput
24+
extends GetExternalDataViewAccessDetailsResponse,
25+
__MetadataBearer {}
26+
27+
/**
28+
* <p>Returns the credentials to access the external Dataview from an S3 location. To call this API:</p>
29+
* <ul>
30+
* <li>
31+
* <p>You must retrieve the programmatic credentials.</p>
32+
* </li>
33+
* <li>
34+
* <p>You must be a member of a FinSpace user group, where the dataset that you want to access has <code>Read Dataset Data</code> permissions.</p>
35+
* </li>
36+
* </ul>
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { FinspaceDataClient, GetExternalDataViewAccessDetailsCommand } from "@aws-sdk/client-finspace-data"; // ES Modules import
41+
* // const { FinspaceDataClient, GetExternalDataViewAccessDetailsCommand } = require("@aws-sdk/client-finspace-data"); // CommonJS import
42+
* const client = new FinspaceDataClient(config);
43+
* const command = new GetExternalDataViewAccessDetailsCommand(input);
44+
* const response = await client.send(command);
45+
* ```
46+
*
47+
* @see {@link GetExternalDataViewAccessDetailsCommandInput} for command's `input` shape.
48+
* @see {@link GetExternalDataViewAccessDetailsCommandOutput} for command's `response` shape.
49+
* @see {@link FinspaceDataClientResolvedConfig | config} for FinspaceDataClient's `config` shape.
50+
*
51+
*/
52+
export class GetExternalDataViewAccessDetailsCommand extends $Command<
53+
GetExternalDataViewAccessDetailsCommandInput,
54+
GetExternalDataViewAccessDetailsCommandOutput,
55+
FinspaceDataClientResolvedConfig
56+
> {
57+
// Start section: command_properties
58+
// End section: command_properties
59+
60+
constructor(readonly input: GetExternalDataViewAccessDetailsCommandInput) {
61+
// Start section: command_constructor
62+
super();
63+
// End section: command_constructor
64+
}
65+
66+
/**
67+
* @internal
68+
*/
69+
resolveMiddleware(
70+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
71+
configuration: FinspaceDataClientResolvedConfig,
72+
options?: __HttpHandlerOptions
73+
): Handler<GetExternalDataViewAccessDetailsCommandInput, GetExternalDataViewAccessDetailsCommandOutput> {
74+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
75+
76+
const stack = clientStack.concat(this.middlewareStack);
77+
78+
const { logger } = configuration;
79+
const clientName = "FinspaceDataClient";
80+
const commandName = "GetExternalDataViewAccessDetailsCommand";
81+
const handlerExecutionContext: HandlerExecutionContext = {
82+
logger,
83+
clientName,
84+
commandName,
85+
inputFilterSensitiveLog: GetExternalDataViewAccessDetailsRequest.filterSensitiveLog,
86+
outputFilterSensitiveLog: GetExternalDataViewAccessDetailsResponse.filterSensitiveLog,
87+
};
88+
const { requestHandler } = configuration;
89+
return stack.resolve(
90+
(request: FinalizeHandlerArguments<any>) =>
91+
requestHandler.handle(request.request as __HttpRequest, options || {}),
92+
handlerExecutionContext
93+
);
94+
}
95+
96+
private serialize(
97+
input: GetExternalDataViewAccessDetailsCommandInput,
98+
context: __SerdeContext
99+
): Promise<__HttpRequest> {
100+
return serializeAws_restJson1GetExternalDataViewAccessDetailsCommand(input, context);
101+
}
102+
103+
private deserialize(
104+
output: __HttpResponse,
105+
context: __SerdeContext
106+
): Promise<GetExternalDataViewAccessDetailsCommandOutput> {
107+
return deserializeAws_restJson1GetExternalDataViewAccessDetailsCommand(output, context);
108+
}
109+
110+
// Start section: command_body_extra
111+
// End section: command_body_extra
112+
}

clients/client-finspace-data/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export * from "./EnableUserCommand";
1313
export * from "./GetChangesetCommand";
1414
export * from "./GetDataViewCommand";
1515
export * from "./GetDatasetCommand";
16+
export * from "./GetExternalDataViewAccessDetailsCommand";
1617
export * from "./GetPermissionGroupCommand";
1718
export * from "./GetProgrammaticAccessCredentialsCommand";
1819
export * from "./GetUserCommand";

clients/client-finspace-data/src/models/models_0.ts

Lines changed: 115 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,42 @@ export class ValidationException extends __BaseException {
181181
}
182182
}
183183

184+
/**
185+
* <p> The credentials required to access the external Dataview from the S3 location.</p>
186+
*/
187+
export interface AwsCredentials {
188+
/**
189+
* <p> The unique identifier for the security credentials.</p>
190+
*/
191+
accessKeyId?: string;
192+
193+
/**
194+
* <p> The secret access key that can be used to sign requests.</p>
195+
*/
196+
secretAccessKey?: string;
197+
198+
/**
199+
* <p> The token that users must pass to use the credentials.</p>
200+
*/
201+
sessionToken?: string;
202+
203+
/**
204+
* <p> The Epoch time when the current credentials expire.</p>
205+
*/
206+
expiration?: number;
207+
}
208+
209+
export namespace AwsCredentials {
210+
/**
211+
* @internal
212+
*/
213+
export const filterSensitiveLog = (obj: AwsCredentials): any => ({
214+
...obj,
215+
...(obj.secretAccessKey && { secretAccessKey: SENSITIVE_STRING }),
216+
...(obj.sessionToken && { sessionToken: SENSITIVE_STRING }),
217+
});
218+
}
219+
184220
export enum ChangeType {
185221
APPEND = "APPEND",
186222
MODIFY = "MODIFY",
@@ -820,6 +856,9 @@ export interface CreatePermissionGroupRequest {
820856

821857
/**
822858
* <p>The option to indicate FinSpace application permissions that are granted to a specific group.</p>
859+
* <important>
860+
* <p>When assigning application permissions, be aware that the permission <code>ManageUsersAndGroups</code> allows users to grant themselves or others access to any functionality in their FinSpace environment's application. It should only be granted to trusted users.</p>
861+
* </important>
823862
* <ul>
824863
* <li>
825864
* <p>
@@ -831,7 +870,7 @@ export interface CreatePermissionGroupRequest {
831870
* </li>
832871
* <li>
833872
* <p>
834-
* <code>ManageUsersAndGroups</code> – Group members can manage users and permission groups.</p>
873+
* <code>ManageUsersAndGroups</code> – Group members can manage users and permission groups. This is a privileged permission that allows users to grant themselves or others access to any functionality in the application. It should only be granted to trusted users.</p>
835874
* </li>
836875
* <li>
837876
* <p>
@@ -1695,6 +1734,73 @@ export namespace GetDataViewResponse {
16951734
});
16961735
}
16971736

1737+
export interface GetExternalDataViewAccessDetailsRequest {
1738+
/**
1739+
* <p>The unique identifier for the Dataview that you want to access.</p>
1740+
*/
1741+
dataViewId: string | undefined;
1742+
1743+
/**
1744+
* <p>The unique identifier for the Dataset.</p>
1745+
*/
1746+
datasetId: string | undefined;
1747+
}
1748+
1749+
export namespace GetExternalDataViewAccessDetailsRequest {
1750+
/**
1751+
* @internal
1752+
*/
1753+
export const filterSensitiveLog = (obj: GetExternalDataViewAccessDetailsRequest): any => ({
1754+
...obj,
1755+
});
1756+
}
1757+
1758+
/**
1759+
* <p>The location of an external Dataview in an S3 bucket.</p>
1760+
*/
1761+
export interface S3Location {
1762+
/**
1763+
* <p> The name of the S3 bucket.</p>
1764+
*/
1765+
bucket: string | undefined;
1766+
1767+
/**
1768+
* <p> The path of the folder, within the S3 bucket that contains the Dataset.</p>
1769+
*/
1770+
key: string | undefined;
1771+
}
1772+
1773+
export namespace S3Location {
1774+
/**
1775+
* @internal
1776+
*/
1777+
export const filterSensitiveLog = (obj: S3Location): any => ({
1778+
...obj,
1779+
});
1780+
}
1781+
1782+
export interface GetExternalDataViewAccessDetailsResponse {
1783+
/**
1784+
* <p>The credentials required to access the external Dataview from the S3 location.</p>
1785+
*/
1786+
credentials?: AwsCredentials;
1787+
1788+
/**
1789+
* <p>The location where the external Dataview is stored.</p>
1790+
*/
1791+
s3Location?: S3Location;
1792+
}
1793+
1794+
export namespace GetExternalDataViewAccessDetailsResponse {
1795+
/**
1796+
* @internal
1797+
*/
1798+
export const filterSensitiveLog = (obj: GetExternalDataViewAccessDetailsResponse): any => ({
1799+
...obj,
1800+
...(obj.credentials && { credentials: AwsCredentials.filterSensitiveLog(obj.credentials) }),
1801+
});
1802+
}
1803+
16981804
export interface GetPermissionGroupRequest {
16991805
/**
17001806
* <p>The unique identifier for the permission group.</p>
@@ -1738,6 +1844,9 @@ export interface PermissionGroup {
17381844

17391845
/**
17401846
* <p>Indicates the permissions that are granted to a specific group for accessing the FinSpace application.</p>
1847+
* <important>
1848+
* <p>When assigning application permissions, be aware that the permission <code>ManageUsersAndGroups</code> allows users to grant themselves or others access to any functionality in their FinSpace environment's application. It should only be granted to trusted users.</p>
1849+
* </important>
17411850
* <ul>
17421851
* <li>
17431852
* <p>
@@ -1749,7 +1858,7 @@ export interface PermissionGroup {
17491858
* </li>
17501859
* <li>
17511860
* <p>
1752-
* <code>ManageUsersAndGroups</code> – Group members can manage users and permission groups.</p>
1861+
* <code>ManageUsersAndGroups</code> – Group members can manage users and permission groups. This is a privileged permission that allows users to grant themselves or others access to any functionality in the application. It should only be granted to trusted users.</p>
17531862
* </li>
17541863
* <li>
17551864
* <p>
@@ -3275,6 +3384,9 @@ export interface UpdatePermissionGroupRequest {
32753384

32763385
/**
32773386
* <p>The permissions that are granted to a specific group for accessing the FinSpace application.</p>
3387+
* <important>
3388+
* <p>When assigning application permissions, be aware that the permission <code>ManageUsersAndGroups</code> allows users to grant themselves or others access to any functionality in their FinSpace environment's application. It should only be granted to trusted users.</p>
3389+
* </important>
32783390
* <ul>
32793391
* <li>
32803392
* <p>
@@ -3286,7 +3398,7 @@ export interface UpdatePermissionGroupRequest {
32863398
* </li>
32873399
* <li>
32883400
* <p>
3289-
* <code>ManageUsersAndGroups</code> – Group members can manage users and permission groups.</p>
3401+
* <code>ManageUsersAndGroups</code> – Group members can manage users and permission groups. This is a privileged permission that allows users to grant themselves or others access to any functionality in the application. It should only be granted to trusted users.</p>
32903402
* </li>
32913403
* <li>
32923404
* <p>

0 commit comments

Comments
 (0)