cdk-iam-floyd
Version:
AWS IAM policy statement generator with fluent interface for AWS CDK
291 lines (290 loc) • 11.1 kB
TypeScript
import { AccessLevelList } from '../../shared/access-level';
import { PolicyStatement, Operator } from '../../shared';
import { aws_iam as iam } from "aws-cdk-lib";
/**
* Statement provider for service [braket](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbraket.html).
*
* @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement
*/
export declare class Braket extends PolicyStatement {
servicePrefix: string;
/**
* Grants permission to accept the Amazon Braket user agreement
*
* Access Level: Write
*/
toAcceptUserAgreement(): this;
/**
* Grants permission to cancel a job
*
* Access Level: Write
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_CancelJob.html
*/
toCancelJob(): this;
/**
* Grants permission to cancel a quantum task
*
* Access Level: Write
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_CancelQuantumTask.html
*/
toCancelQuantumTask(): this;
/**
* Grants permission to create a job
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_CreateJob.html
*/
toCreateJob(): this;
/**
* Grants permission to create a quantum task
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_CreateQuantumTask.html
*/
toCreateQuantumTask(): this;
/**
* Grants permission to create a spending limit
*
* Access Level: Write
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_CreateSpendingLimit.html
*/
toCreateSpendingLimit(): this;
/**
* Grants permission to delete a spending limit
*
* Access Level: Write
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_DeleteSpendingLimit.html
*/
toDeleteSpendingLimit(): this;
/**
* Grants permission to retrieve information about the devices available in Amazon Braket
*
* Access Level: Read
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_GetDevice.html
*/
toGetDevice(): this;
/**
* Grants permission to retrieve jobs
*
* Access Level: Read
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_GetJob.html
*/
toGetJob(): this;
/**
* Grants permission to retrieve quantum tasks
*
* Access Level: Read
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_GetQuantumTask.html
*/
toGetQuantumTask(): this;
/**
* Grants permission to check if the Amazon Braket service linked role has been created
*
* Access Level: Read
*/
toGetServiceLinkedRoleStatus(): this;
/**
* Grants permission to check if the account has accepted the Amazon Braket user agreement
*
* Access Level: Read
*/
toGetUserAgreementStatus(): this;
/**
* Grants permission to listing the tags that have been applied to the quantum task resource or the job
*
* Access Level: Read
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_ListTagsForResource.html
*/
toListTagsForResource(): this;
/**
* Grants permission to search for devices available in Amazon Braket
*
* Access Level: List
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_SearchDevices.html
*/
toSearchDevices(): this;
/**
* Grants permission to search for jobs
*
* Access Level: List
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_SearchJobs.html
*/
toSearchJobs(): this;
/**
* Grants permission to search for quantum tasks
*
* Access Level: List
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_SearchQuantumTasks.html
*/
toSearchQuantumTasks(): this;
/**
* Grants permission to search for spending limit
*
* Access Level: Read
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_SearchSpendingLimits.html
*/
toSearchSpendingLimits(): this;
/**
* Grants permission to add one or more tags to a quantum task or a hybrid job
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsRequestTag()
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_TagResource.html
*/
toTagResource(): this;
/**
* Grants permission to remove one or more tags from a quantum task resource or a job. A tag consists of a key-value pair
*
* Access Level: Tagging
*
* Possible conditions:
* - .ifAwsTagKeys()
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_UntagResource.html
*/
toUntagResource(): this;
/**
* Grants permission to update a spending limit
*
* Access Level: Write
*
* https://docs.aws.amazon.com/braket/latest/APIReference/API_UpdateSpendingLimit.html
*/
toUpdateSpendingLimit(): this;
protected accessLevelList: AccessLevelList;
/**
* Adds a resource of type quantum-task to the statement
*
* https://docs.aws.amazon.com/braket/latest/developerguide/braket-manage-access.html#resources
*
* @param randomId - Identifier for the randomId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onQuantumTask(randomId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type job to the statement
*
* https://docs.aws.amazon.com/braket/latest/developerguide/braket-manage-access.html#resources
*
* @param randomId - Identifier for the randomId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onJob(randomId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type spending-limit to the statement
*
* https://docs.aws.amazon.com/braket/latest/developerguide/braket-manage-access.html#resources
*
* @param randomId - Identifier for the randomId.
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*
* Possible conditions:
* - .ifAwsResourceTag()
*/
onSpendingLimit(randomId: string, account?: string, region?: string, partition?: string): this;
/**
* Adds a resource of type device to the statement
*
* https://docs.aws.amazon.com/braket/latest/developerguide/restrict-access.html
*
* @param deviceType - Identifier for the deviceType.
* @param provider - Identifier for the provider.
* @param deviceId - Identifier for the deviceId.
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
*/
onDevice(deviceType: string, provider: string, deviceId: string, partition?: string): this;
/**
* Filters access by the presence of tag key-value pairs in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag
*
* Applies to actions:
* - .toCreateJob()
* - .toCreateQuantumTask()
* - .toCreateSpendingLimit()
* - .toTagResource()
*
* @param tagKey The tag key to check
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsRequestTag(tagKey: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by tag key-value pairs attached to the resource
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag
*
* Applies to resource types:
* - quantum-task
* - job
* - spending-limit
*
* @param tagKey The tag key to check
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsResourceTag(tagKey: string, value: string | string[], operator?: Operator | string): this;
/**
* Filters access by the presence of tag keys in the request
*
* https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys
*
* Applies to actions:
* - .toCreateJob()
* - .toCreateQuantumTask()
* - .toCreateSpendingLimit()
* - .toTagResource()
* - .toUntagResource()
*
* @param value The value(s) to check
* @param operator Works with [string operators](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html#Conditions_String). **Default:** `StringLike`
*/
ifAwsTagKeys(value: string | string[], operator?: Operator | string): this;
/**
* Statement provider for service [braket](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonbraket.html).
*
*/
constructor(props?: iam.PolicyStatementProps);
}