Skip to content

Commit

Permalink
feat(client-verifiedpermissions): Adds description field to PolicySto…
Browse files Browse the repository at this point in the history
…re API's and namespaces field to GetSchema.
  • Loading branch information
awstools committed Dec 1, 2023
1 parent 93a1fe5 commit 87207b4
Show file tree
Hide file tree
Showing 9 changed files with 169 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ export interface BatchIsAuthorizedCommandOutput extends BatchIsAuthorizedOutput,
* entities that you declare. The result of the decisions is a series of <code>Allow</code>
* or <code>Deny</code> responses, along with the IDs of the policies that produced each
* decision.</p>
* <p>The <code>entities</code> of a <code>BatchIsAuthorized</code> API request can contain up to 100 principals and up
* to 100 resources. The <code>requests</code> of a <code>BatchIsAuthorized</code> API request can contain up to 30
* requests.</p>
* <p>The <code>entities</code> of a <code>BatchIsAuthorized</code> API request can contain
* up to 100 principals and up to 100 resources. The <code>requests</code> of a
* <code>BatchIsAuthorized</code> API request can contain up to 30 requests.</p>
* <note>
* <p>The <code>BatchIsAuthorized</code> operation doesn't have its own IAM
* permission. To authorize this operation for Amazon Web Services principals, include the permission
* <code>verifiedpermissions:IsAuthorized</code> in their IAM policies.</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 @@ -14,7 +14,11 @@ import {
SMITHY_CONTEXT_KEY,
} from "@smithy/types";

import { CreatePolicyStoreInput, CreatePolicyStoreOutput } from "../models/models_0";
import {
CreatePolicyStoreInput,
CreatePolicyStoreInputFilterSensitiveLog,
CreatePolicyStoreOutput,
} from "../models/models_0";
import { de_CreatePolicyStoreCommand, se_CreatePolicyStoreCommand } from "../protocols/Aws_json1_0";
import {
ServiceInputTypes,
Expand Down Expand Up @@ -63,6 +67,7 @@ export interface CreatePolicyStoreCommandOutput extends CreatePolicyStoreOutput,
* validationSettings: { // ValidationSettings
* mode: "OFF" || "STRICT", // required
* },
* description: "STRING_VALUE",
* };
* const command = new CreatePolicyStoreCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -228,7 +233,7 @@ export class CreatePolicyStoreCommand extends $Command<
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
inputFilterSensitiveLog: CreatePolicyStoreInputFilterSensitiveLog,
outputFilterSensitiveLog: (_: any) => _,
[SMITHY_CONTEXT_KEY]: {
service: "VerifiedPermissions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
SMITHY_CONTEXT_KEY,
} from "@smithy/types";

import { GetPolicyStoreInput, GetPolicyStoreOutput } from "../models/models_0";
import { GetPolicyStoreInput, GetPolicyStoreOutput, GetPolicyStoreOutputFilterSensitiveLog } from "../models/models_0";
import { de_GetPolicyStoreCommand, se_GetPolicyStoreCommand } from "../protocols/Aws_json1_0";
import {
ServiceInputTypes,
Expand Down Expand Up @@ -61,6 +61,7 @@ export interface GetPolicyStoreCommandOutput extends GetPolicyStoreOutput, __Met
* // },
* // createdDate: new Date("TIMESTAMP"), // required
* // lastUpdatedDate: new Date("TIMESTAMP"), // required
* // description: "STRING_VALUE",
* // };
*
* ```
Expand Down Expand Up @@ -215,7 +216,7 @@ export class GetPolicyStoreCommand extends $Command<
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: GetPolicyStoreOutputFilterSensitiveLog,
[SMITHY_CONTEXT_KEY]: {
service: "VerifiedPermissions",
operation: "GetPolicyStore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export interface GetSchemaCommandOutput extends GetSchemaOutput, __MetadataBeare
* // schema: "STRING_VALUE", // required
* // createdDate: new Date("TIMESTAMP"), // required
* // lastUpdatedDate: new Date("TIMESTAMP"), // required
* // namespaces: [ // NamespaceList
* // "STRING_VALUE",
* // ],
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import {
SMITHY_CONTEXT_KEY,
} from "@smithy/types";

import { ListPolicyStoresInput, ListPolicyStoresOutput } from "../models/models_0";
import {
ListPolicyStoresInput,
ListPolicyStoresOutput,
ListPolicyStoresOutputFilterSensitiveLog,
} from "../models/models_0";
import { de_ListPolicyStoresCommand, se_ListPolicyStoresCommand } from "../protocols/Aws_json1_0";
import {
ServiceInputTypes,
Expand Down Expand Up @@ -61,6 +65,8 @@ export interface ListPolicyStoresCommandOutput extends ListPolicyStoresOutput, _
* // policyStoreId: "STRING_VALUE", // required
* // arn: "STRING_VALUE", // required
* // createdDate: new Date("TIMESTAMP"), // required
* // lastUpdatedDate: new Date("TIMESTAMP"),
* // description: "STRING_VALUE",
* // },
* // ],
* // };
Expand Down Expand Up @@ -214,7 +220,7 @@ export class ListPolicyStoresCommand extends $Command<
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: ListPolicyStoresOutputFilterSensitiveLog,
[SMITHY_CONTEXT_KEY]: {
service: "VerifiedPermissions",
operation: "ListPolicyStores",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ import {
SMITHY_CONTEXT_KEY,
} from "@smithy/types";

import { UpdatePolicyStoreInput, UpdatePolicyStoreOutput } from "../models/models_0";
import {
UpdatePolicyStoreInput,
UpdatePolicyStoreInputFilterSensitiveLog,
UpdatePolicyStoreOutput,
} from "../models/models_0";
import { de_UpdatePolicyStoreCommand, se_UpdatePolicyStoreCommand } from "../protocols/Aws_json1_0";
import {
ServiceInputTypes,
Expand Down Expand Up @@ -59,6 +63,7 @@ export interface UpdatePolicyStoreCommandOutput extends UpdatePolicyStoreOutput,
* validationSettings: { // ValidationSettings
* mode: "OFF" || "STRICT", // required
* },
* description: "STRING_VALUE",
* };
* const command = new UpdatePolicyStoreCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -224,7 +229,7 @@ export class UpdatePolicyStoreCommand extends $Command<
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
inputFilterSensitiveLog: UpdatePolicyStoreInputFilterSensitiveLog,
outputFilterSensitiveLog: (_: any) => _,
[SMITHY_CONTEXT_KEY]: {
service: "VerifiedPermissions",
Expand Down
81 changes: 81 additions & 0 deletions clients/client-verifiedpermissions/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,13 @@ export interface CreatePolicyStoreInput {
* </important>
*/
validationSettings: ValidationSettings | undefined;

/**
* @public
* <p>Descriptive text that you can provide to help with identification
* of the current policy store.</p>
*/
description?: string;
}

/**
Expand Down Expand Up @@ -1487,6 +1494,13 @@ export interface GetPolicyStoreOutput {
* <p>The date and time that the policy store was last updated.</p>
*/
lastUpdatedDate: Date | undefined;

/**
* @public
* <p>Descriptive text that you can provide to help with identification
* of the current policy store.</p>
*/
description?: string;
}

/**
Expand Down Expand Up @@ -1586,6 +1600,12 @@ export interface GetSchemaOutput {
* <p>The date and time that the schema was most recently updated.</p>
*/
lastUpdatedDate: Date | undefined;

/**
* @public
* <p>The namespaces of the entities referenced by this schema.</p>
*/
namespaces?: string[];
}

/**
Expand Down Expand Up @@ -2269,6 +2289,19 @@ export interface PolicyStoreItem {
* <p>The date and time the policy was created.</p>
*/
createdDate: Date | undefined;

/**
* @public
* <p>The date and time the policy store was most recently updated.</p>
*/
lastUpdatedDate?: Date;

/**
* @public
* <p>Descriptive text that you can provide to help with identification
* of the current policy store.</p>
*/
description?: string;
}

/**
Expand Down Expand Up @@ -2760,6 +2793,13 @@ export interface UpdatePolicyStoreInput {
* policy store.</p>
*/
validationSettings: ValidationSettings | undefined;

/**
* @public
* <p>Descriptive text that you can provide to help with identification
* of the current policy store.</p>
*/
description?: string;
}

/**
Expand Down Expand Up @@ -3408,6 +3448,14 @@ export const CreatePolicyOutputFilterSensitiveLog = (obj: CreatePolicyOutput): a
...(obj.resource && { resource: EntityIdentifierFilterSensitiveLog(obj.resource) }),
});

/**
* @internal
*/
export const CreatePolicyStoreInputFilterSensitiveLog = (obj: CreatePolicyStoreInput): any => ({
...obj,
...(obj.description && { description: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand Down Expand Up @@ -3483,6 +3531,14 @@ export const GetPolicyOutputFilterSensitiveLog = (obj: GetPolicyOutput): any =>
...(obj.definition && { definition: PolicyDefinitionDetailFilterSensitiveLog(obj.definition) }),
});

/**
* @internal
*/
export const GetPolicyStoreOutputFilterSensitiveLog = (obj: GetPolicyStoreOutput): any => ({
...obj,
...(obj.description && { description: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand All @@ -3498,6 +3554,7 @@ export const GetPolicyTemplateOutputFilterSensitiveLog = (obj: GetPolicyTemplate
export const GetSchemaOutputFilterSensitiveLog = (obj: GetSchemaOutput): any => ({
...obj,
...(obj.schema && { schema: SENSITIVE_STRING }),
...(obj.namespaces && { namespaces: SENSITIVE_STRING }),
});

/**
Expand Down Expand Up @@ -3653,6 +3710,22 @@ export const ListPoliciesOutputFilterSensitiveLog = (obj: ListPoliciesOutput): a
...(obj.policies && { policies: obj.policies.map((item) => PolicyItemFilterSensitiveLog(item)) }),
});

/**
* @internal
*/
export const PolicyStoreItemFilterSensitiveLog = (obj: PolicyStoreItem): any => ({
...obj,
...(obj.description && { description: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const ListPolicyStoresOutputFilterSensitiveLog = (obj: ListPolicyStoresOutput): any => ({
...obj,
...(obj.policyStores && { policyStores: obj.policyStores.map((item) => PolicyStoreItemFilterSensitiveLog(item)) }),
});

/**
* @internal
*/
Expand Down Expand Up @@ -3738,6 +3811,14 @@ export const PutSchemaOutputFilterSensitiveLog = (obj: PutSchemaOutput): any =>
...(obj.namespaces && { namespaces: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const UpdatePolicyStoreInputFilterSensitiveLog = (obj: UpdatePolicyStoreInput): any => ({
...obj,
...(obj.description && { description: SENSITIVE_STRING }),
});

/**
* @internal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2186,6 +2186,7 @@ const se_CreatePolicyInput = (input: CreatePolicyInput, context: __SerdeContext)
const se_CreatePolicyStoreInput = (input: CreatePolicyStoreInput, context: __SerdeContext): any => {
return take(input, {
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
description: [],
validationSettings: _json,
});
};
Expand Down Expand Up @@ -2581,6 +2582,7 @@ const de_GetPolicyStoreOutput = (output: any, context: __SerdeContext): GetPolic
return take(output, {
arn: __expectString,
createdDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
description: __expectString,
lastUpdatedDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
policyStoreId: __expectString,
validationSettings: _json,
Expand Down Expand Up @@ -2608,6 +2610,7 @@ const de_GetSchemaOutput = (output: any, context: __SerdeContext): GetSchemaOutp
return take(output, {
createdDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
lastUpdatedDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
namespaces: _json,
policyStoreId: __expectString,
schema: __expectString,
}) as any;
Expand Down Expand Up @@ -2730,6 +2733,8 @@ const de_PolicyStoreItem = (output: any, context: __SerdeContext): PolicyStoreIt
return take(output, {
arn: __expectString,
createdDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
description: __expectString,
lastUpdatedDate: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
policyStoreId: __expectString,
}) as any;
};
Expand Down
Loading

0 comments on commit 87207b4

Please sign in to comment.