published on Thursday, May 14, 2026 by Byteplus
published on Thursday, May 14, 2026 by Byteplus
Control policy.
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
organizationServiceControlPolicyDemo:
type: bytepluscc: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
Example coming soon!
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: bytepluscc:organization:ServiceControlPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "bytepluscc_organization_servicecontrolpolicy" "name" {
# resource properties
}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 Bytepluscc.Organization.ServiceControlPolicy("serviceControlPolicyResource", new()
{
PolicyName = "string",
Statement = "string",
Description = "string",
Targets = new[]
{
new Bytepluscc.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"),
},
},
})
resource "bytepluscc_organization_servicecontrolpolicy" "serviceControlPolicyResource" {
policy_name = "string"
statement = "string"
description = "string"
targets {
target_id = "string"
target_type = "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 = bytepluscc.organization.ServiceControlPolicy("serviceControlPolicyResource",
policy_name="string",
statement="string",
description="string",
targets=[{
"target_id": "string",
"target_type": "string",
}])
const serviceControlPolicyResource = new bytepluscc.organization.ServiceControlPolicy("serviceControlPolicyResource", {
policyName: "string",
statement: "string",
description: "string",
targets: [{
targetId: "string",
targetType: "string",
}],
});
type: bytepluscc: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:
- Policy
Name string - Policy name.
- Statement string
- Policy expression.
- Description string
- Description.
- Targets
List<Byteplus.
Service Control Policy Target>
- Policy
Name string - Policy name.
- Statement string
- Policy expression.
- Description string
- Description.
- Targets
[]Service
Control Policy Target Args
- policy_
name string - Policy name.
- statement string
- Policy expression.
- description string
- Description.
- targets list(object)
- policy
Name String - Policy name.
- statement String
- Policy expression.
- description String
- Description.
- targets
List<Service
Control Policy Target>
- policy
Name string - Policy name.
- statement string
- Policy expression.
- description string
- Description.
- targets
Service
Control Policy Target[]
- policy_
name str - Policy name.
- statement str
- Policy expression.
- description str
- Description.
- targets
Sequence[Service
Control Policy Target Args]
- policy
Name 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:
- Create
Date string - Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Policy
Id string - Policy ID.
- Policy
Type string - Policy type.
- Update
Date string - Update time.
- Create
Date string - Creation time.
- Id string
- The provider-assigned unique ID for this managed resource.
- Policy
Id string - Policy ID.
- Policy
Type string - Policy type.
- Update
Date string - Update time.
- create_
date string - Creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- policy_
id string - Policy ID.
- policy_
type string - Policy type.
- update_
date string - Update time.
- create
Date String - Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- policy
Id String - Policy ID.
- policy
Type String - Policy type.
- update
Date String - Update time.
- create
Date string - Creation time.
- id string
- The provider-assigned unique ID for this managed resource.
- policy
Id string - Policy ID.
- policy
Type string - Policy type.
- update
Date 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.
- create
Date String - Creation time.
- id String
- The provider-assigned unique ID for this managed resource.
- policy
Id String - Policy ID.
- policy
Type String - Policy type.
- update
Date 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) -> ServiceControlPolicyfunc 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: bytepluscc:organization:ServiceControlPolicy get: id: ${id}import {
to = bytepluscc_organization_servicecontrolpolicy.example
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.
- Create
Date string - Creation time.
- Description string
- Description.
- Policy
Id string - Policy ID.
- Policy
Name string - Policy name.
- Policy
Type string - Policy type.
- Statement string
- Policy expression.
- Targets
List<Byteplus.
Service Control Policy Target> - Update
Date string - Update time.
- Create
Date string - Creation time.
- Description string
- Description.
- Policy
Id string - Policy ID.
- Policy
Name string - Policy name.
- Policy
Type string - Policy type.
- Statement string
- Policy expression.
- Targets
[]Service
Control Policy Target Args - Update
Date string - Update time.
- create_
date string - Creation time.
- description string
- Description.
- policy_
id string - Policy ID.
- policy_
name string - Policy name.
- policy_
type string - Policy type.
- statement string
- Policy expression.
- targets list(object)
- update_
date string - Update time.
- create
Date String - Creation time.
- description String
- Description.
- policy
Id String - Policy ID.
- policy
Name String - Policy name.
- policy
Type String - Policy type.
- statement String
- Policy expression.
- targets
List<Service
Control Policy Target> - update
Date String - Update time.
- create
Date string - Creation time.
- description string
- Description.
- policy
Id string - Policy ID.
- policy
Name string - Policy name.
- policy
Type string - Policy type.
- statement string
- Policy expression.
- targets
Service
Control Policy Target[] - update
Date 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[Service
Control Policy Target Args] - update_
date str - Update time.
- create
Date String - Creation time.
- description String
- Description.
- policy
Id String - Policy ID.
- policy
Name String - Policy name.
- policy
Type String - Policy type.
- statement String
- Policy expression.
- targets List<Property Map>
- update
Date String - Update time.
Supporting Types
ServiceControlPolicyTarget, ServiceControlPolicyTargetArgs
- Target
Id string - Target ID.
- Target
Type string - Target type: 1. OU 2. Account.
- Target
Id string - Target ID.
- Target
Type string - Target type: 1. OU 2. Account.
- target_
id string - Target ID.
- target_
type string - Target type: 1. OU 2. Account.
- target
Id String - Target ID.
- target
Type String - Target type: 1. OU 2. Account.
- target
Id string - Target ID.
- target
Type string - Target type: 1. OU 2. Account.
- target_
id str - Target ID.
- target_
type str - Target type: 1. OU 2. Account.
- target
Id String - Target ID.
- target
Type String - Target type: 1. OU 2. Account.
Import
$ pulumi import bytepluscc:organization/serviceControlPolicy:ServiceControlPolicy example "policy_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bytepluscc byteplus-sdk/pulumi-bytepluscc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
byteplusccTerraform Provider.
published on Thursday, May 14, 2026 by Byteplus
