import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a CloudWatch Omni Access Grant. An access grant gives a principal a permission within a CloudWatch Omni space. * * > **NOTE:** CloudWatch Omni does not support updating an access grant, so changing any argument other than `tags` replaces it. Tags are updated in place. * * > **NOTE:** Except for `CUSTOM` grants, a principal can hold only one grant of each permission in a space. Creating a duplicate returns `ConflictException`. * * > **NOTE:** CloudWatch Omni creates service-managed access grants alongside each space. They cannot be deleted and are not managed by this resource. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatchomni.AccessGrant("example", { * principal: { * principalType: "IAM_ROLE", * principalId: exampleAwsIamRole.arn, * }, * name: "example", * domainId: exampleAwsCloudwatchomniDomain.domainId, * spaceId: exampleAwsCloudwatchomniSpace.spaceId, * permission: "READ", * tags: { * Environment: "production", * }, * }); * ``` * * ### Custom Permission * * A `CUSTOM` permission requires at least one `scopedAction` block. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.cloudwatchomni.AccessGrant("example", { * principal: { * principalType: "IAM_ROLE", * principalId: exampleAwsIamRole.arn, * }, * scopedActions: [{ * resources: [{ * rowScopeGroups: [{ * rowScopes: [{ * field: "serviceName", * operator: "IN", * values: [ * "checkout", * "payments", * ], * }], * }], * resourceType: "DataSet", * signalTypes: ["LOGS"], * }], * actions: ["cloudwatch:GetRecords"], * }], * name: "example", * domainId: exampleAwsCloudwatchomniDomain.domainId, * spaceId: exampleAwsCloudwatchomniSpace.spaceId, * permission: "CUSTOM", * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `grantId` (String) Access grant ID. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import a CloudWatch Omni Access Grant using the `grantId`. For example: * * ```sh * $ pulumi import aws:cloudwatchomni/accessGrant:AccessGrant example 12345678-1234-1234-1234-123456789012 * ``` */ export declare class AccessGrant extends pulumi.CustomResource { /** * Get an existing AccessGrant resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: AccessGrantState, opts?: pulumi.CustomResourceOptions): AccessGrant; /** * Check whether an existing AccessGrant resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: AccessGrantState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of AccessGrant. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AccessGrant; /** * ARN of the access grant. */ readonly arn: pulumi.Output; /** * ID of the CloudWatch Omni domain that contains the space. Changing this forces a new resource. */ readonly domainId: pulumi.Output; /** * Unique ID of the access grant. */ readonly grantId: pulumi.Output; /** * Who manages the access grant. */ readonly grantType: pulumi.Output; /** * Name of the access grant. Must be 1-64 characters and contain only letters, numbers, underscores (`_`) and hyphens (`-`). Changing this forces a new resource. */ readonly name: pulumi.Output; /** * Permission to grant. Valid values are `SPACE_ADMIN`, `READ`, `READ_WRITE_DELETE` and `CUSTOM`. Changing this forces a new resource. */ readonly permission: pulumi.Output; /** * Principal receiving the grant. See below. Changing this forces a new resource. */ readonly principal: pulumi.Output; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Group of actions to allow, with the resource scopes and conditions that limit them. Up to 20 blocks. Required for the `CUSTOM` permission, and can also be used with the other permissions. See below. Changing this forces a new resource. */ readonly scopedActions: pulumi.Output; /** * ID of the CloudWatch Omni space to scope the grant to. Changing this forces a new resource. * * The following arguments are optional: */ readonly spaceId: pulumi.Output; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Create a AccessGrant resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: AccessGrantArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AccessGrant resources. */ export interface AccessGrantState { /** * ARN of the access grant. */ arn?: pulumi.Input; /** * ID of the CloudWatch Omni domain that contains the space. Changing this forces a new resource. */ domainId?: pulumi.Input; /** * Unique ID of the access grant. */ grantId?: pulumi.Input; /** * Who manages the access grant. */ grantType?: pulumi.Input; /** * Name of the access grant. Must be 1-64 characters and contain only letters, numbers, underscores (`_`) and hyphens (`-`). Changing this forces a new resource. */ name?: pulumi.Input; /** * Permission to grant. Valid values are `SPACE_ADMIN`, `READ`, `READ_WRITE_DELETE` and `CUSTOM`. Changing this forces a new resource. */ permission?: pulumi.Input; /** * Principal receiving the grant. See below. Changing this forces a new resource. */ principal?: pulumi.Input; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Group of actions to allow, with the resource scopes and conditions that limit them. Up to 20 blocks. Required for the `CUSTOM` permission, and can also be used with the other permissions. See below. Changing this forces a new resource. */ scopedActions?: pulumi.Input[] | undefined>; /** * ID of the CloudWatch Omni space to scope the grant to. Changing this forces a new resource. * * The following arguments are optional: */ spaceId?: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } /** * The set of arguments for constructing a AccessGrant resource. */ export interface AccessGrantArgs { /** * ID of the CloudWatch Omni domain that contains the space. Changing this forces a new resource. */ domainId: pulumi.Input; /** * Name of the access grant. Must be 1-64 characters and contain only letters, numbers, underscores (`_`) and hyphens (`-`). Changing this forces a new resource. */ name?: pulumi.Input; /** * Permission to grant. Valid values are `SPACE_ADMIN`, `READ`, `READ_WRITE_DELETE` and `CUSTOM`. Changing this forces a new resource. */ permission: pulumi.Input; /** * Principal receiving the grant. See below. Changing this forces a new resource. */ principal: pulumi.Input; /** * Region where this resource is managed. Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Group of actions to allow, with the resource scopes and conditions that limit them. Up to 20 blocks. Required for the `CUSTOM` permission, and can also be used with the other permissions. See below. Changing this forces a new resource. */ scopedActions?: pulumi.Input[] | undefined>; /** * ID of the CloudWatch Omni space to scope the grant to. Changing this forces a new resource. * * The following arguments are optional: */ spaceId: pulumi.Input; /** * Map of tags assigned to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } //# sourceMappingURL=accessGrant.d.ts.map