UNPKG

@volcengine/pulumi

Version:

A Pulumi package for creating and managing volcengine cloud resources.

106 lines (105 loc) 3.86 kB
import * as pulumi from "@pulumi/pulumi"; /** * Provides a resource to manage organization service control policy attachment * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as volcengine from "@volcengine/pulumi"; * * const fooServiceControlPolicy = new volcengine.organization.ServiceControlPolicy("fooServiceControlPolicy", { * policyName: "tfpolicy11", * description: "tftest1", * statement: "{\"Statement\":[{\"Effect\":\"Deny\",\"Action\":[\"ecs:RunInstances\"],\"Resource\":[\"*\"]}]}", * }); * const fooServiceControlPolicyAttachment = new volcengine.organization.ServiceControlPolicyAttachment("fooServiceControlPolicyAttachment", { * policyId: fooServiceControlPolicy.id, * targetId: "21*********94", * targetType: "Account", * }); * const foo1 = new volcengine.organization.ServiceControlPolicyAttachment("foo1", { * policyId: fooServiceControlPolicy.id, * targetId: "73*********9", * targetType: "OU", * }); * ``` * * ## Import * * Service Control policy attachment can be imported using the id, e.g. * * ```sh * $ pulumi import volcengine:organization/serviceControlPolicyAttachment:ServiceControlPolicyAttachment default PolicyID:TargetID * ``` */ export declare class ServiceControlPolicyAttachment extends pulumi.CustomResource { /** * Get an existing ServiceControlPolicyAttachment 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<pulumi.ID>, state?: ServiceControlPolicyAttachmentState, opts?: pulumi.CustomResourceOptions): ServiceControlPolicyAttachment; /** * Returns true if the given object is an instance of ServiceControlPolicyAttachment. 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 ServiceControlPolicyAttachment; /** * The id of policy. */ readonly policyId: pulumi.Output<string>; /** * The id of target. */ readonly targetId: pulumi.Output<string>; /** * The type of target. Support Account or OU. */ readonly targetType: pulumi.Output<string>; /** * Create a ServiceControlPolicyAttachment 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: ServiceControlPolicyAttachmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ServiceControlPolicyAttachment resources. */ export interface ServiceControlPolicyAttachmentState { /** * The id of policy. */ policyId?: pulumi.Input<string>; /** * The id of target. */ targetId?: pulumi.Input<string>; /** * The type of target. Support Account or OU. */ targetType?: pulumi.Input<string>; } /** * The set of arguments for constructing a ServiceControlPolicyAttachment resource. */ export interface ServiceControlPolicyAttachmentArgs { /** * The id of policy. */ policyId: pulumi.Input<string>; /** * The id of target. */ targetId: pulumi.Input<string>; /** * The type of target. Support Account or OU. */ targetType: pulumi.Input<string>; }