Skip to content

Commit

Permalink
feat(client-opensearchserverless): Neo Integration via IAM Identity C…
Browse files Browse the repository at this point in the history
…enter (IdC)
  • Loading branch information
awstools committed Oct 30, 2024
1 parent 83a5718 commit cecccbe
Show file tree
Hide file tree
Showing 7 changed files with 370 additions and 1 deletion.
2 changes: 1 addition & 1 deletion clients/client-opensearchserverless/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Amazon OpenSearch Serverless?</a>

## Installing

To install the this package, simply type add or install @aws-sdk/client-opensearchserverless
To install this package, simply type add or install @aws-sdk/client-opensearchserverless
using your favorite package manager:

- `npm install @aws-sdk/client-opensearchserverless`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export interface CreateSecurityConfigCommandOutput extends CreateSecurityConfigR
* groupAttribute: "STRING_VALUE",
* sessionTimeout: Number("int"),
* },
* iamIdentityCenterOptions: { // CreateIamIdentityCenterConfigOptions
* instanceArn: "STRING_VALUE", // required
* userAttribute: "STRING_VALUE",
* groupAttribute: "STRING_VALUE",
* },
* clientToken: "STRING_VALUE",
* };
* const command = new CreateSecurityConfigCommand(input);
Expand All @@ -67,6 +72,14 @@ export interface CreateSecurityConfigCommandOutput extends CreateSecurityConfigR
* // groupAttribute: "STRING_VALUE",
* // sessionTimeout: Number("int"),
* // },
* // iamIdentityCenterOptions: { // IamIdentityCenterConfigOptions
* // instanceArn: "STRING_VALUE",
* // applicationArn: "STRING_VALUE",
* // applicationName: "STRING_VALUE",
* // applicationDescription: "STRING_VALUE",
* // userAttribute: "STRING_VALUE",
* // groupAttribute: "STRING_VALUE",
* // },
* // createdDate: Number("long"),
* // lastModifiedDate: Number("long"),
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ export interface GetSecurityConfigCommandOutput extends GetSecurityConfigRespons
* // groupAttribute: "STRING_VALUE",
* // sessionTimeout: Number("int"),
* // },
* // iamIdentityCenterOptions: { // IamIdentityCenterConfigOptions
* // instanceArn: "STRING_VALUE",
* // applicationArn: "STRING_VALUE",
* // applicationName: "STRING_VALUE",
* // applicationDescription: "STRING_VALUE",
* // userAttribute: "STRING_VALUE",
* // groupAttribute: "STRING_VALUE",
* // },
* // createdDate: Number("long"),
* // lastModifiedDate: Number("long"),
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export interface UpdateSecurityConfigCommandOutput extends UpdateSecurityConfigR
* groupAttribute: "STRING_VALUE",
* sessionTimeout: Number("int"),
* },
* iamIdentityCenterOptionsUpdates: { // UpdateIamIdentityCenterConfigOptions
* userAttribute: "STRING_VALUE",
* groupAttribute: "STRING_VALUE",
* },
* clientToken: "STRING_VALUE",
* };
* const command = new UpdateSecurityConfigCommand(input);
Expand All @@ -67,6 +71,14 @@ export interface UpdateSecurityConfigCommandOutput extends UpdateSecurityConfigR
* // groupAttribute: "STRING_VALUE",
* // sessionTimeout: Number("int"),
* // },
* // iamIdentityCenterOptions: { // IamIdentityCenterConfigOptions
* // instanceArn: "STRING_VALUE",
* // applicationArn: "STRING_VALUE",
* // applicationName: "STRING_VALUE",
* // applicationDescription: "STRING_VALUE",
* // userAttribute: "STRING_VALUE",
* // groupAttribute: "STRING_VALUE",
* // },
* // createdDate: Number("long"),
* // lastModifiedDate: Number("long"),
* // },
Expand Down
153 changes: 153 additions & 0 deletions clients/client-opensearchserverless/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,76 @@ export interface UpdateCollectionResponse {
updateCollectionDetail?: UpdateCollectionDetail;
}

/**
* @public
* @enum
*/
export const IamIdentityCenterGroupAttribute = {
/**
* Group ID
*/
GroupId: "GroupId",
/**
* Group Name
*/
GroupName: "GroupName",
} as const;

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

/**
* @public
* @enum
*/
export const IamIdentityCenterUserAttribute = {
/**
* Email
*/
Email: "Email",
/**
* User ID
*/
UserId: "UserId",
/**
* User Name
*/
UserName: "UserName",
} as const;

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

/**
* <p>Describes IAM Identity Center options for creating an OpenSearch Serverless security configuration in the form of a key-value map.</p>
* @public
*/
export interface CreateIamIdentityCenterConfigOptions {
/**
* <p>The ARN of the IAM Identity Center instance used to integrate with OpenSearch Serverless.</p>
* @public
*/
instanceArn: string | undefined;

/**
* <p>The user attribute for this IAM Identity Center integration. Defaults to <code>UserId</code>.</p>
* @public
*/
userAttribute?: IamIdentityCenterUserAttribute;

/**
* <p>The group attribute for this IAM Identity Center integration. Defaults to <code>GroupId</code>.</p>
* @public
*/
groupAttribute?: IamIdentityCenterGroupAttribute;
}

/**
* @public
*/
Expand Down Expand Up @@ -1620,6 +1690,10 @@ export interface SamlConfigOptions {
* @enum
*/
export const SecurityConfigType = {
/**
* iam identity center
*/
iamidentitycenter: "iamidentitycenter",
/**
* saml provider
*/
Expand Down Expand Up @@ -1660,13 +1734,62 @@ export interface CreateSecurityConfigRequest {
*/
samlOptions?: SamlConfigOptions;

/**
* <p>Describes IAM Identity Center options in the form of a key-value map. This field is required if you specify iamidentitycenter for the type parameter.</p>
* @public
*/
iamIdentityCenterOptions?: CreateIamIdentityCenterConfigOptions;

/**
* <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
* @public
*/
clientToken?: string;
}

/**
* <p>Describes IAM Identity Center options for an OpenSearch Serverless security configuration in the form of a key-value map.</p>
* @public
*/
export interface IamIdentityCenterConfigOptions {
/**
* <p>The ARN of the IAM Identity Center instance used to integrate with OpenSearch Serverless.</p>
* @public
*/
instanceArn?: string;

/**
* <p>The ARN of the IAM Identity Center application used to integrate with OpenSearch Serverless.</p>
* @public
*/
applicationArn?: string;

/**
* <p>The name of the IAM Identity Center application used to integrate with OpenSearch Serverless.</p>
* @public
*/
applicationName?: string;

/**
* <p>The description of the IAM Identity Center application used to integrate with OpenSearch Serverless.</p>
* @public
*/
applicationDescription?: string;

/**
* <p>The user attribute for this IAM Identity Center integration. Defaults to <code>UserId</code>
* </p>
* @public
*/
userAttribute?: IamIdentityCenterUserAttribute;

/**
* <p>The group attribute for this IAM Identity Center integration. Defaults to <code>GroupId</code>.</p>
* @public
*/
groupAttribute?: IamIdentityCenterGroupAttribute;
}

/**
* <p>Details about a security configuration for OpenSearch Serverless. </p>
* @public
Expand Down Expand Up @@ -1702,6 +1825,12 @@ export interface SecurityConfigDetail {
*/
samlOptions?: SamlConfigOptions;

/**
* <p>Describes IAM Identity Center options in the form of a key-value map.</p>
* @public
*/
iamIdentityCenterOptions?: IamIdentityCenterConfigOptions;

/**
* <p>The date the configuration was created.</p>
* @public
Expand Down Expand Up @@ -2624,6 +2753,24 @@ export interface ListVpcEndpointsResponse {
nextToken?: string;
}

/**
* <p>Describes IAM Identity Center options for updating an OpenSearch Serverless security configuration in the form of a key-value map.</p>
* @public
*/
export interface UpdateIamIdentityCenterConfigOptions {
/**
* <p>The user attribute for this IAM Identity Center integration. Defaults to <code>UserId</code>.</p>
* @public
*/
userAttribute?: IamIdentityCenterUserAttribute;

/**
* <p>The group attribute for this IAM Identity Center integration. Defaults to <code>GroupId</code>.</p>
* @public
*/
groupAttribute?: IamIdentityCenterGroupAttribute;
}

/**
* @public
*/
Expand Down Expand Up @@ -2656,6 +2803,12 @@ export interface UpdateSecurityConfigRequest {
*/
samlOptions?: SamlConfigOptions;

/**
* <p>Describes IAM Identity Center options in the form of a key-value map.</p>
* @public
*/
iamIdentityCenterOptionsUpdates?: UpdateIamIdentityCenterConfigOptions;

/**
* <p>Unique, case-sensitive identifier to ensure idempotency of the request.</p>
* @public
Expand Down
10 changes: 10 additions & 0 deletions clients/client-opensearchserverless/src/protocols/Aws_json1_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ import {
CreateAccessPolicyRequest,
CreateAccessPolicyResponse,
CreateCollectionRequest,
CreateIamIdentityCenterConfigOptions,
CreateLifecyclePolicyRequest,
CreateLifecyclePolicyResponse,
CreateSecurityConfigRequest,
Expand Down Expand Up @@ -162,6 +163,7 @@ import {
UpdateAccessPolicyResponse,
UpdateAccountSettingsRequest,
UpdateCollectionRequest,
UpdateIamIdentityCenterConfigOptions,
UpdateLifecyclePolicyRequest,
UpdateLifecyclePolicyResponse,
UpdateSecurityConfigRequest,
Expand Down Expand Up @@ -1565,6 +1567,8 @@ const se_CreateCollectionRequest = (input: CreateCollectionRequest, context: __S
});
};

// se_CreateIamIdentityCenterConfigOptions omitted.

/**
* serializeAws_json1_0CreateLifecyclePolicyRequest
*/
Expand All @@ -1585,6 +1589,7 @@ const se_CreateSecurityConfigRequest = (input: CreateSecurityConfigRequest, cont
return take(input, {
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
description: [],
iamIdentityCenterOptions: _json,
name: [],
samlOptions: _json,
type: [],
Expand Down Expand Up @@ -1759,6 +1764,8 @@ const se_UpdateCollectionRequest = (input: UpdateCollectionRequest, context: __S
});
};

// se_UpdateIamIdentityCenterConfigOptions omitted.

/**
* serializeAws_json1_0UpdateLifecyclePolicyRequest
*/
Expand All @@ -1781,6 +1788,7 @@ const se_UpdateSecurityConfigRequest = (input: UpdateSecurityConfigRequest, cont
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
configVersion: [],
description: [],
iamIdentityCenterOptionsUpdates: _json,
id: [],
samlOptions: _json,
});
Expand Down Expand Up @@ -1958,6 +1966,8 @@ const de_GetSecurityPolicyResponse = (output: any, context: __SerdeContext): Get
}) as any;
};

// de_IamIdentityCenterConfigOptions omitted.

// de_InternalServerException omitted.

/**
Expand Down
Loading

0 comments on commit cecccbe

Please sign in to comment.