1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. organization
  6. ServiceControlPolicy
Viewing docs for volcenginecc v0.0.33
published on Thursday, May 7, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.33
published on Thursday, May 7, 2026 by Volcengine

    Control policy.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      organizationServiceControlPolicyDemo:
        type: volcenginecc:organization:ServiceControlPolicy
        name: OrganizationServiceControlPolicyDemo
        properties:
          policyName: ccapi-test
          description: ccapi-test-desc
          statement:
            fn::toJSON:
              Statement:
                - Effect: Deny
                  Action:
                    - iam:*
                  Resource:
                    - '*'
                  Condition:
                    StringNotEqualsIfExists:
                      volc:UserName:
                        - a
          targets:
            - target_id: 212***
              target_type: Account
            - target_id: 21****
              target_type: Account
    

    Create ServiceControlPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServiceControlPolicy(name: string, args: ServiceControlPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceControlPolicy(resource_name: str,
                             args: ServiceControlPolicyArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceControlPolicy(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             policy_name: Optional[str] = None,
                             statement: Optional[str] = None,
                             description: Optional[str] = None,
                             targets: Optional[Sequence[ServiceControlPolicyTargetArgs]] = None)
    func NewServiceControlPolicy(ctx *Context, name string, args ServiceControlPolicyArgs, opts ...ResourceOption) (*ServiceControlPolicy, error)
    public ServiceControlPolicy(string name, ServiceControlPolicyArgs args, CustomResourceOptions? opts = null)
    public ServiceControlPolicy(String name, ServiceControlPolicyArgs args)
    public ServiceControlPolicy(String name, ServiceControlPolicyArgs args, CustomResourceOptions options)
    
    type: volcenginecc:organization:ServiceControlPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServiceControlPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ServiceControlPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ServiceControlPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceControlPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceControlPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var serviceControlPolicyResource = new Volcenginecc.Organization.ServiceControlPolicy("serviceControlPolicyResource", new()
    {
        PolicyName = "string",
        Statement = "string",
        Description = "string",
        Targets = new[]
        {
            new Volcenginecc.Organization.Inputs.ServiceControlPolicyTargetArgs
            {
                TargetId = "string",
                TargetType = "string",
            },
        },
    });
    
    example, err := organization.NewServiceControlPolicy(ctx, "serviceControlPolicyResource", &organization.ServiceControlPolicyArgs{
    	PolicyName:  pulumi.String("string"),
    	Statement:   pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Targets: organization.ServiceControlPolicyTargetArray{
    		&organization.ServiceControlPolicyTargetArgs{
    			TargetId:   pulumi.String("string"),
    			TargetType: pulumi.String("string"),
    		},
    	},
    })
    
    var serviceControlPolicyResource = new ServiceControlPolicy("serviceControlPolicyResource", ServiceControlPolicyArgs.builder()
        .policyName("string")
        .statement("string")
        .description("string")
        .targets(ServiceControlPolicyTargetArgs.builder()
            .targetId("string")
            .targetType("string")
            .build())
        .build());
    
    service_control_policy_resource = volcenginecc.organization.ServiceControlPolicy("serviceControlPolicyResource",
        policy_name="string",
        statement="string",
        description="string",
        targets=[{
            "target_id": "string",
            "target_type": "string",
        }])
    
    const serviceControlPolicyResource = new volcenginecc.organization.ServiceControlPolicy("serviceControlPolicyResource", {
        policyName: "string",
        statement: "string",
        description: "string",
        targets: [{
            targetId: "string",
            targetType: "string",
        }],
    });
    
    type: volcenginecc:organization:ServiceControlPolicy
    properties:
        description: string
        policyName: string
        statement: string
        targets:
            - targetId: string
              targetType: string
    

    ServiceControlPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ServiceControlPolicy resource accepts the following input properties:

    PolicyName string
    Policy name.
    Statement string
    Policy expression.
    Description string
    Description.
    Targets List<Volcengine.ServiceControlPolicyTarget>
    PolicyName string
    Policy name.
    Statement string
    Policy expression.
    Description string
    Description.
    Targets []ServiceControlPolicyTargetArgs
    policyName String
    Policy name.
    statement String
    Policy expression.
    description String
    Description.
    targets List<ServiceControlPolicyTarget>
    policyName string
    Policy name.
    statement string
    Policy expression.
    description string
    Description.
    targets ServiceControlPolicyTarget[]
    policy_name str
    Policy name.
    statement str
    Policy expression.
    description str
    Description.
    targets Sequence[ServiceControlPolicyTargetArgs]
    policyName String
    Policy name.
    statement String
    Policy expression.
    description String
    Description.
    targets List<Property Map>

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServiceControlPolicy resource produces the following output properties:

    CreateDate string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    PolicyId string
    Policy ID.
    PolicyType string
    Policy type.
    UpdateDate string
    Update time.
    CreateDate string
    Creation time.
    Id string
    The provider-assigned unique ID for this managed resource.
    PolicyId string
    Policy ID.
    PolicyType string
    Policy type.
    UpdateDate string
    Update time.
    createDate String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    policyId String
    Policy ID.
    policyType String
    Policy type.
    updateDate String
    Update time.
    createDate string
    Creation time.
    id string
    The provider-assigned unique ID for this managed resource.
    policyId string
    Policy ID.
    policyType string
    Policy type.
    updateDate string
    Update time.
    create_date str
    Creation time.
    id str
    The provider-assigned unique ID for this managed resource.
    policy_id str
    Policy ID.
    policy_type str
    Policy type.
    update_date str
    Update time.
    createDate String
    Creation time.
    id String
    The provider-assigned unique ID for this managed resource.
    policyId String
    Policy ID.
    policyType String
    Policy type.
    updateDate String
    Update time.

    Look up Existing ServiceControlPolicy Resource

    Get an existing ServiceControlPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ServiceControlPolicyState, opts?: CustomResourceOptions): ServiceControlPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_date: Optional[str] = None,
            description: Optional[str] = None,
            policy_id: Optional[str] = None,
            policy_name: Optional[str] = None,
            policy_type: Optional[str] = None,
            statement: Optional[str] = None,
            targets: Optional[Sequence[ServiceControlPolicyTargetArgs]] = None,
            update_date: Optional[str] = None) -> ServiceControlPolicy
    func GetServiceControlPolicy(ctx *Context, name string, id IDInput, state *ServiceControlPolicyState, opts ...ResourceOption) (*ServiceControlPolicy, error)
    public static ServiceControlPolicy Get(string name, Input<string> id, ServiceControlPolicyState? state, CustomResourceOptions? opts = null)
    public static ServiceControlPolicy get(String name, Output<String> id, ServiceControlPolicyState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:organization:ServiceControlPolicy    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreateDate string
    Creation time.
    Description string
    Description.
    PolicyId string
    Policy ID.
    PolicyName string
    Policy name.
    PolicyType string
    Policy type.
    Statement string
    Policy expression.
    Targets List<Volcengine.ServiceControlPolicyTarget>
    UpdateDate string
    Update time.
    CreateDate string
    Creation time.
    Description string
    Description.
    PolicyId string
    Policy ID.
    PolicyName string
    Policy name.
    PolicyType string
    Policy type.
    Statement string
    Policy expression.
    Targets []ServiceControlPolicyTargetArgs
    UpdateDate string
    Update time.
    createDate String
    Creation time.
    description String
    Description.
    policyId String
    Policy ID.
    policyName String
    Policy name.
    policyType String
    Policy type.
    statement String
    Policy expression.
    targets List<ServiceControlPolicyTarget>
    updateDate String
    Update time.
    createDate string
    Creation time.
    description string
    Description.
    policyId string
    Policy ID.
    policyName string
    Policy name.
    policyType string
    Policy type.
    statement string
    Policy expression.
    targets ServiceControlPolicyTarget[]
    updateDate string
    Update time.
    create_date str
    Creation time.
    description str
    Description.
    policy_id str
    Policy ID.
    policy_name str
    Policy name.
    policy_type str
    Policy type.
    statement str
    Policy expression.
    targets Sequence[ServiceControlPolicyTargetArgs]
    update_date str
    Update time.
    createDate String
    Creation time.
    description String
    Description.
    policyId String
    Policy ID.
    policyName String
    Policy name.
    policyType String
    Policy type.
    statement String
    Policy expression.
    targets List<Property Map>
    updateDate String
    Update time.

    Supporting Types

    ServiceControlPolicyTarget, ServiceControlPolicyTargetArgs

    TargetId string
    Target ID.
    TargetType string
    Target type: 1. OU 2. Account.
    TargetId string
    Target ID.
    TargetType string
    Target type: 1. OU 2. Account.
    targetId String
    Target ID.
    targetType String
    Target type: 1. OU 2. Account.
    targetId string
    Target ID.
    targetType string
    Target type: 1. OU 2. Account.
    target_id str
    Target ID.
    target_type str
    Target type: 1. OU 2. Account.
    targetId String
    Target ID.
    targetType String
    Target type: 1. OU 2. Account.

    Import

    $ pulumi import volcenginecc:organization/serviceControlPolicy:ServiceControlPolicy example "policy_id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.33
    published on Thursday, May 7, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.