UNPKG

iam-floyd

Version:

AWS IAM policy statement generator with fluent interface

313 lines (312 loc) 11.6 kB
import { AccessLevelList } from '../../shared/access-level'; import { PolicyStatement, Operator } from '../../shared'; /** * Statement provider for service [billing](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbilling.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ export declare class Billing extends PolicyStatement { servicePrefix: string; /** * Statement provider for service [billing](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsbilling.html). * * @param sid [SID](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html) of the statement */ constructor(sid?: string); /** * Grants permission to create a billing view * * Access Level: Write * * Possible conditions: * - .ifAwsRequestTag() * - .ifAwsTagKeys() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_CreateBillingView.html */ toCreateBillingView(): this; /** * Grants permission to delete a billing view * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_DeleteBillingView.html */ toDeleteBillingView(): this; /** * Grants permission to delete a billing view resource policy * * Access Level: Permissions management * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_DeleteResourcePolicy.html */ toDeleteResourcePolicy(): this; /** * Grants permission to perform queries on billing information * * Access Level: Read * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toGetBillingData(): this; /** * Grants permission to view detailed line item billing information * * Access Level: Read * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toGetBillingDetails(): this; /** * Grants permission to view notifications sent by AWS related to your accounts billing information * * Access Level: Read * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toGetBillingNotifications(): this; /** * Grants permission to view billing preferences such as reserved instance, savings plans and credits sharing * * Access Level: Read * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toGetBillingPreferences(): this; /** * Grants permission to get the metadata for a specified billing view * * Access Level: Read * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_GetBillingView.html */ toGetBillingView(): this; /** * Grants permission to view the account's contract information including the contract number, end-user organization names, PO numbers and if the account is used to service public-sector customers * * Access Level: Read * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toGetContractInformation(): this; /** * Grants permission to view credits that have been redeemed * * Access Level: Read * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toGetCredits(): this; /** * Grants permission to retrieve the state of the Allow IAM Access billing preference * * Access Level: Read * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toGetIAMAccessPreference(): this; /** * Grants permission to get the resource policy specified billing view * * Access Level: Permissions management * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_GetResourcePolicy.html */ toGetResourcePolicy(): this; /** * Grants permission to retrieve the account's default Seller of Record * * Access Level: Read * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toGetSellerOfRecord(): this; /** * Grants permission to get a list of all your available billing views * * Access Level: Read * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_ListBillingViews.html */ toListBillingViews(): this; /** * Grants permission to get the list of source views for a specified billing view * * Access Level: List * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_ListSourceViewsForBillingView.html */ toListSourceViewsForBillingView(): this; /** * Grants permission to get the list of tags for a specified billing view * * Access Level: Read * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_ListTagsForResource.html */ toListTagsForResource(): this; /** * Grants permission to set the account's contract information end-user organization names and if the account is used to service public-sector customers * * Access Level: Write * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toPutContractInformation(): this; /** * Grants permission to put a billing view resource policy * * Access Level: Permissions management * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_PutResourcePolicy.html */ toPutResourcePolicy(): this; /** * Grants permission to redeem an AWS credit * * Access Level: Write * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toRedeemCredits(): this; /** * Grants permission to add tags to a specified billing view * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsRequestTag() * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_TagResource.html */ toTagResource(): this; /** * Grants permission to remove a tag from a specified billing view * * Access Level: Tagging * * Possible conditions: * - .ifAwsTagKeys() * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_UntagResource.html */ toUntagResource(): this; /** * Grants permission to update billing preferences such as reserved instance, savings plans and credits sharing * * Access Level: Write * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toUpdateBillingPreferences(): this; /** * Grants permission to update a billing view * * Access Level: Write * * Possible conditions: * - .ifAwsResourceTag() * * https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_billing_UpdateBillingView.html */ toUpdateBillingView(): this; /** * Grants permission to update the Allow IAM Access billing preference * * Access Level: Write * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html#user-permissions */ toUpdateIAMAccessPreference(): this; protected accessLevelList: AccessLevelList; /** * Adds a resource of type billingview to the statement * * https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ * * @param resourceId - Identifier for the resourceId. * @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account. * @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() */ onBillingview(resourceId: string, account?: 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: * - .toCreateBillingView() * - .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 actions: * - .toDeleteBillingView() * - .toDeleteResourcePolicy() * - .toGetBillingView() * - .toGetResourcePolicy() * - .toListSourceViewsForBillingView() * - .toListTagsForResource() * - .toPutResourcePolicy() * - .toTagResource() * - .toUntagResource() * - .toUpdateBillingView() * * Applies to resource types: * - billingview * * @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: * - .toCreateBillingView() * - .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; }