UNPKG

cdk-iam-floyd

Version:

AWS IAM policy statement generator with fluent interface for AWS CDK

319 lines (318 loc) 12.1 kB
import { AccessLevelList } from '../../shared/access-level'; import { PolicyStatement, Operator } from '../../shared'; import { aws_iam as iam } from "aws-cdk-lib"; /** * Statement provider for service [mediastore](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediastore.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Mediastore extends PolicyStatement { servicePrefix: string; /** * Grants permission to create a container * * Access Level: Write * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_CreateContainer.html */ toCreateContainer(): this; /** * Grants permission to delete a container * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_DeleteContainer.html */ toDeleteContainer(): this; /** * Grants permission to delete the access policy of a container * * Access Level: Permissions management * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_DeleteContainerPolicy.html */ toDeleteContainerPolicy(): this; /** * Grants permission to delete the CORS policy from a container * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_DeleteCorsPolicy.html */ toDeleteCorsPolicy(): this; /** * Grants permission to delete the lifecycle policy from a container * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_DeleteLifecyclePolicy.html */ toDeleteLifecyclePolicy(): this; /** * Grants permission to delete the metric policy from a container * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_DeleteMetricPolicy.html */ toDeleteMetricPolicy(): this; /** * Grants permission to delete an object * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_objstore_DeleteObject.html */ toDeleteObject(): this; /** * Grants permission to retrieve details on a container * * Access Level: List * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_DescribeContainer.html */ toDescribeContainer(): this; /** * Grants permission to retrieve metadata for an object * * Access Level: List * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_objstore_DescribeObject.html */ toDescribeObject(): this; /** * Grants permission to retrieve the access policy of a container * * Access Level: Read * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_GetContainerPolicy.html */ toGetContainerPolicy(): this; /** * Grants permission to retrieve the CORS policy of a container * * Access Level: Read * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_GetCorsPolicy.html */ toGetCorsPolicy(): this; /** * Grants permission to retrieve the lifecycle policy that is assigned to a container * * Access Level: Read * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_GetLifecyclePolicy.html */ toGetLifecyclePolicy(): this; /** * Grants permission to retrieve the metric policy that is assigned to a container * * Access Level: Read * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_GetMetricPolicy.html */ toGetMetricPolicy(): this; /** * Grants permission to retrieve an object * * Access Level: Read * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_objstore_GetObject.html */ toGetObject(): this; /** * Grants permission to retrieve a list of containers in the current account * * Access Level: List * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_ListContainers.html */ toListContainers(): this; /** * Grants permission to retrieve a list of objects and subfolders that are stored in a folder * * Access Level: List * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_objstore_ListItems.html */ toListItems(): this; /** * Grants permission to list tags on a container * * Access Level: Read * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to create or replace the access policy of a container * * Access Level: Permissions management * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_PutContainerPolicy.html */ toPutContainerPolicy(): this; /** * Grants permission to add or modify the CORS policy of a container * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_PutCorsPolicy.html */ toPutCorsPolicy(): this; /** * Grants permission to add or modify the lifecycle policy that is assigned to a container * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_PutLifecyclePolicy.html */ toPutLifecyclePolicy(): this; /** * Grants permission to add or modify the metric policy that is assigned to a container * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_PutMetricPolicy.html */ toPutMetricPolicy(): this; /** * Grants permission to upload an object * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_objstore_PutObject.html */ toPutObject(): this; /** * Grants permission to start access logging on a container * * Access Level: Write * * Dependent actions: * - iam:PassRole * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_StartAccessLogging.html */ toStartAccessLogging(): this; /** * Grants permission to stop access logging on a container * * Access Level: Write * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_StopAccessLogging.html */ toStopAccessLogging(): this; /** * Grants permission to add tags to a container * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_TagResource.html */ toTagResource(): this; /** * Grants permission to remove tags from a container * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/mediastore/latest/apireference/API_UntagResource.html */ toUntagResource(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type container to the statement * * https://docs.aws.amazon.com/mediastore/latest/ug/containers.html * * @param containerName - Identifier for the containerName. * @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() */ onContainer(containerName: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type object to the statement * * https://docs.aws.amazon.com/mediastore/latest/ug/objects.html * * @param containerName - Identifier for the containerName. * @param objectPath - Identifier for the objectPath. * @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. */ onObject(containerName: string, objectPath: string, account?: string, region?: string, partition?: string): this; /** * Adds a resource of type folder to the statement * * https://docs.aws.amazon.com/mediastore/latest/ug/folders.html * * @param containerName - Identifier for the containerName. * @param folderPath - Identifier for the folderPath. * @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. */ onFolder(containerName: string, folderPath: string, account?: string, region?: string, partition?: string): this; /** * Filters access by the tags that are passed in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-requesttag * * Applies to actions: * - .toCreateContainer() * - .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 the tags associated with the resource * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourcetag * * Applies to resource types: * - container * * @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 tag keys that are passed in the request * * https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-tagkeys * * Applies to actions: * - .toCreateContainer() * - .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 [mediastore](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awselementalmediastore.html). * */ constructor(props?: iam.PolicyStatementProps); }