Class Policy
Allows management of Organization policies for a Google Organization. For more information see the official documentation and API.
Example Usage
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var serialPortPolicy = new Gcp.Organizations.Policy("serialPortPolicy", new Gcp.Organizations.PolicyArgs
{
BooleanPolicy = new Gcp.Organizations.Inputs.PolicyBooleanPolicyArgs
{
Enforced = true,
},
Constraint = "compute.disableSerialPortAccess",
OrgId = "123456789",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.Organizations
Assembly: Pulumi.Gcp.dll
Syntax
public class Policy : CustomResource
Constructors
View SourcePolicy(String, PolicyArgs, CustomResourceOptions)
Create a Policy resource with the given unique name, arguments, and options.
Declaration
public Policy(string name, PolicyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| PolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBooleanPolicy
A boolean policy is a constraint that is either enforced or not. Structure is documented below.
Declaration
public Output<PolicyBooleanPolicy> BooleanPolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<PolicyBooleanPolicy> |
Constraint
The name of the Constraint the Policy is configuring, for example, serviceuser.services. Check out the complete list of available constraints.
Declaration
public Output<string> Constraint { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Etag
(Computed) The etag of the organization policy. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other.
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ListPolicy
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.
Declaration
public Output<PolicyListPolicy> ListPolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<PolicyListPolicy> |
OrgId
The numeric ID of the organization to set the policy for.
Declaration
public Output<string> OrgId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RestorePolicy
A restore policy is a constraint to restore the default policy. Structure is documented below.
Declaration
public Output<PolicyRestorePolicy> RestorePolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<PolicyRestorePolicy> |
UpdateTime
(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".
Declaration
public Output<string> UpdateTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Version
Version of the Policy. Default version is 0.
Declaration
public Output<int> Version { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Methods
View SourceGet(String, Input<String>, PolicyState, CustomResourceOptions)
Get an existing Policy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Policy Get(string name, Input<string> id, PolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| PolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Policy |