OrganizationPolicy
Allows management of Organization policies for a Google Project. For more information see the official documentation and API.
Create a OrganizationPolicy Resource
new OrganizationPolicy(name: string, args: OrganizationPolicyArgs, opts?: CustomResourceOptions);def OrganizationPolicy(resource_name, opts=None, boolean_policy=None, constraint=None, list_policy=None, project=None, restore_policy=None, version=None, __props__=None);func NewOrganizationPolicy(ctx *Context, name string, args OrganizationPolicyArgs, opts ...ResourceOption) (*OrganizationPolicy, error)public OrganizationPolicy(string name, OrganizationPolicyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args OrganizationPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args OrganizationPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrganizationPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
OrganizationPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The OrganizationPolicy resource accepts the following input properties:
- Constraint string
The name of the Constraint the Policy is configuring, for example,
serviceuser.services. Check out the complete list of available constraints.- Project string
The project id of the project to set the policy for.
- Boolean
Policy OrganizationPolicy Boolean Policy Args A boolean policy is a constraint that is either enforced or not. Structure is documented below.
- List
Policy OrganizationPolicy List Policy Args A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.
- Restore
Policy OrganizationPolicy Restore Policy Args A restore policy is a constraint to restore the default policy. Structure is documented below.
- Version int
Version of the Policy. Default version is 0.
- Constraint string
The name of the Constraint the Policy is configuring, for example,
serviceuser.services. Check out the complete list of available constraints.- Project string
The project id of the project to set the policy for.
- Boolean
Policy OrganizationPolicy Boolean Policy A boolean policy is a constraint that is either enforced or not. Structure is documented below.
- List
Policy OrganizationPolicy List Policy A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.
- Restore
Policy OrganizationPolicy Restore Policy A restore policy is a constraint to restore the default policy. Structure is documented below.
- Version int
Version of the Policy. Default version is 0.
- constraint string
The name of the Constraint the Policy is configuring, for example,
serviceuser.services. Check out the complete list of available constraints.- project string
The project id of the project to set the policy for.
- boolean
Policy OrganizationPolicy Boolean Policy A boolean policy is a constraint that is either enforced or not. Structure is documented below.
- list
Policy OrganizationPolicy List Policy A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.
- restore
Policy OrganizationPolicy Restore Policy A restore policy is a constraint to restore the default policy. Structure is documented below.
- version number
Version of the Policy. Default version is 0.
- constraint str
The name of the Constraint the Policy is configuring, for example,
serviceuser.services. Check out the complete list of available constraints.- project str
The project id of the project to set the policy for.
- boolean_
policy Dict[OrganizationPolicy Boolean Policy] A boolean policy is a constraint that is either enforced or not. Structure is documented below.
- list_
policy Dict[OrganizationPolicy List Policy] A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.
- restore_
policy Dict[OrganizationPolicy Restore Policy] A restore policy is a constraint to restore the default policy. Structure is documented below.
- version float
Version of the Policy. Default version is 0.
Outputs
All input properties are implicitly available as output properties. Additionally, the OrganizationPolicy resource produces the following output properties:
- Etag string
(Computed) The etag of the organization policy.
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string (Computed) The timestamp in RFC3339 UTC “Zulu” format, accurate to nanoseconds, representing when the variable was last updated. Example: “2016-10-09T12:33:37.578138407Z”.
- Etag string
(Computed) The etag of the organization policy.
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string (Computed) The timestamp in RFC3339 UTC “Zulu” format, accurate to nanoseconds, representing when the variable was last updated. Example: “2016-10-09T12:33:37.578138407Z”.
- etag string
(Computed) The etag of the organization policy.
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.- id string
- The provider-assigned unique ID for this managed resource.
- update
Time string (Computed) The timestamp in RFC3339 UTC “Zulu” format, accurate to nanoseconds, representing when the variable was last updated. Example: “2016-10-09T12:33:37.578138407Z”.
- etag str
(Computed) The etag of the organization policy.
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.- id str
- The provider-assigned unique ID for this managed resource.
- update_
time str (Computed) The timestamp in RFC3339 UTC “Zulu” format, accurate to nanoseconds, representing when the variable was last updated. Example: “2016-10-09T12:33:37.578138407Z”.
Look up an Existing OrganizationPolicy Resource
Get an existing OrganizationPolicy 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?: OrganizationPolicyState, opts?: CustomResourceOptions): OrganizationPolicystatic get(resource_name, id, opts=None, boolean_policy=None, constraint=None, etag=None, list_policy=None, project=None, restore_policy=None, update_time=None, version=None, __props__=None);func GetOrganizationPolicy(ctx *Context, name string, id IDInput, state *OrganizationPolicyState, opts ...ResourceOption) (*OrganizationPolicy, error)public static OrganizationPolicy Get(string name, Input<string> id, OrganizationPolicyState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Boolean
Policy OrganizationPolicy Boolean Policy Args A boolean policy is a constraint that is either enforced or not. Structure is documented below.
- Constraint string
The name of the Constraint the Policy is configuring, for example,
serviceuser.services. Check out the complete list of available constraints.- Etag string
(Computed) The etag of the organization policy.
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.- List
Policy OrganizationPolicy List Policy Args A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.
- Project string
The project id of the project to set the policy for.
- Restore
Policy OrganizationPolicy Restore Policy Args A restore policy is a constraint to restore the default policy. Structure is documented below.
- Update
Time string (Computed) The timestamp in RFC3339 UTC “Zulu” format, accurate to nanoseconds, representing when the variable was last updated. Example: “2016-10-09T12:33:37.578138407Z”.
- Version int
Version of the Policy. Default version is 0.
- Boolean
Policy OrganizationPolicy Boolean Policy A boolean policy is a constraint that is either enforced or not. Structure is documented below.
- Constraint string
The name of the Constraint the Policy is configuring, for example,
serviceuser.services. Check out the complete list of available constraints.- Etag string
(Computed) The etag of the organization policy.
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.- List
Policy OrganizationPolicy List Policy A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.
- Project string
The project id of the project to set the policy for.
- Restore
Policy OrganizationPolicy Restore Policy A restore policy is a constraint to restore the default policy. Structure is documented below.
- Update
Time string (Computed) The timestamp in RFC3339 UTC “Zulu” format, accurate to nanoseconds, representing when the variable was last updated. Example: “2016-10-09T12:33:37.578138407Z”.
- Version int
Version of the Policy. Default version is 0.
- boolean
Policy OrganizationPolicy Boolean Policy A boolean policy is a constraint that is either enforced or not. Structure is documented below.
- constraint string
The name of the Constraint the Policy is configuring, for example,
serviceuser.services. Check out the complete list of available constraints.- etag string
(Computed) The etag of the organization policy.
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.- list
Policy OrganizationPolicy List Policy A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.
- project string
The project id of the project to set the policy for.
- restore
Policy OrganizationPolicy Restore Policy A restore policy is a constraint to restore the default policy. Structure is documented below.
- update
Time string (Computed) The timestamp in RFC3339 UTC “Zulu” format, accurate to nanoseconds, representing when the variable was last updated. Example: “2016-10-09T12:33:37.578138407Z”.
- version number
Version of the Policy. Default version is 0.
- boolean_
policy Dict[OrganizationPolicy Boolean Policy] A boolean policy is a constraint that is either enforced or not. Structure is documented below.
- constraint str
The name of the Constraint the Policy is configuring, for example,
serviceuser.services. Check out the complete list of available constraints.- etag str
(Computed) The etag of the organization policy.
etagis used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.- list_
policy Dict[OrganizationPolicy List Policy] A policy that can define specific values that are allowed or denied for the given constraint. It can also be used to allow or deny all values. Structure is documented below.
- project str
The project id of the project to set the policy for.
- restore_
policy Dict[OrganizationPolicy Restore Policy] A restore policy is a constraint to restore the default policy. Structure is documented below.
- update_
time str (Computed) The timestamp in RFC3339 UTC “Zulu” format, accurate to nanoseconds, representing when the variable was last updated. Example: “2016-10-09T12:33:37.578138407Z”.
- version float
Version of the Policy. Default version is 0.
Supporting Types
OrganizationPolicyBooleanPolicy
OrganizationPolicyListPolicy
- Allow
Organization
Policy List Policy Allow Args or
deny- (Optional) One or the other must be set.- Deny
Organization
Policy List Policy Deny Args - Inherit
From boolParent If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.
- Suggested
Value string The Google Cloud Console will try to default to a configuration that matches the value specified in this field.
- Allow
Organization
Policy List Policy Allow or
deny- (Optional) One or the other must be set.- Deny
Organization
Policy List Policy Deny - Inherit
From boolParent If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.
- Suggested
Value string The Google Cloud Console will try to default to a configuration that matches the value specified in this field.
- allow
Organization
Policy List Policy Allow or
deny- (Optional) One or the other must be set.- deny
Organization
Policy List Policy Deny - inherit
From booleanParent If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.
- suggested
Value string The Google Cloud Console will try to default to a configuration that matches the value specified in this field.
- allow
Dict[Organization
Policy List Policy Allow] or
deny- (Optional) One or the other must be set.- deny
Dict[Organization
Policy List Policy Deny] - inherit
From boolParent If set to true, the values from the effective Policy of the parent resource are inherited, meaning the values set in this Policy are added to the values inherited up the hierarchy.
- suggested
Value str The Google Cloud Console will try to default to a configuration that matches the value specified in this field.
OrganizationPolicyListPolicyAllow
- All bool
The policy allows or denies all values.
- Values List<string>
The policy can define specific values that are allowed or denied.
OrganizationPolicyListPolicyDeny
- All bool
The policy allows or denies all values.
- Values List<string>
The policy can define specific values that are allowed or denied.
OrganizationPolicyRestorePolicy
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.