1. Packages
  2. Googleworkspace Provider
  3. API Docs
  4. ChromePolicy
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp

googleworkspace.ChromePolicy

Explore with Pulumi AI

googleworkspace logo
googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as googleworkspace from "@pulumi/googleworkspace";
    
    const exampleOrgUnit = new googleworkspace.OrgUnit("exampleOrgUnit", {parentOrgUnitPath: "/"});
    const exampleChromePolicy = new googleworkspace.ChromePolicy("exampleChromePolicy", {
        orgUnitId: googleworkspace_org_unit.test.id,
        policies: [{
            schemaName: "chrome.users.MaxConnectionsPerProxy",
            schemaValues: {
                maxConnectionsPerProxy: JSON.stringify(34),
            },
        }],
    });
    
    import pulumi
    import json
    import pulumi_googleworkspace as googleworkspace
    
    example_org_unit = googleworkspace.OrgUnit("exampleOrgUnit", parent_org_unit_path="/")
    example_chrome_policy = googleworkspace.ChromePolicy("exampleChromePolicy",
        org_unit_id=googleworkspace_org_unit["test"]["id"],
        policies=[{
            "schema_name": "chrome.users.MaxConnectionsPerProxy",
            "schema_values": {
                "maxConnectionsPerProxy": json.dumps(34),
            },
        }])
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/googleworkspace/googleworkspace"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := googleworkspace.NewOrgUnit(ctx, "exampleOrgUnit", &googleworkspace.OrgUnitArgs{
    			ParentOrgUnitPath: pulumi.String("/"),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(34)
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = googleworkspace.NewChromePolicy(ctx, "exampleChromePolicy", &googleworkspace.ChromePolicyArgs{
    			OrgUnitId: pulumi.Any(googleworkspace_org_unit.Test.Id),
    			Policies: googleworkspace.ChromePolicyPolicyArray{
    				&googleworkspace.ChromePolicyPolicyArgs{
    					SchemaName: pulumi.String("chrome.users.MaxConnectionsPerProxy"),
    					SchemaValues: pulumi.StringMap{
    						"maxConnectionsPerProxy": pulumi.String(json0),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Googleworkspace = Pulumi.Googleworkspace;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleOrgUnit = new Googleworkspace.OrgUnit("exampleOrgUnit", new()
        {
            ParentOrgUnitPath = "/",
        });
    
        var exampleChromePolicy = new Googleworkspace.ChromePolicy("exampleChromePolicy", new()
        {
            OrgUnitId = googleworkspace_org_unit.Test.Id,
            Policies = new[]
            {
                new Googleworkspace.Inputs.ChromePolicyPolicyArgs
                {
                    SchemaName = "chrome.users.MaxConnectionsPerProxy",
                    SchemaValues = 
                    {
                        { "maxConnectionsPerProxy", JsonSerializer.Serialize(34) },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.googleworkspace.OrgUnit;
    import com.pulumi.googleworkspace.OrgUnitArgs;
    import com.pulumi.googleworkspace.ChromePolicy;
    import com.pulumi.googleworkspace.ChromePolicyArgs;
    import com.pulumi.googleworkspace.inputs.ChromePolicyPolicyArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var exampleOrgUnit = new OrgUnit("exampleOrgUnit", OrgUnitArgs.builder()
                .parentOrgUnitPath("/")
                .build());
    
            var exampleChromePolicy = new ChromePolicy("exampleChromePolicy", ChromePolicyArgs.builder()
                .orgUnitId(googleworkspace_org_unit.test().id())
                .policies(ChromePolicyPolicyArgs.builder()
                    .schemaName("chrome.users.MaxConnectionsPerProxy")
                    .schemaValues(Map.of("maxConnectionsPerProxy", serializeJson(
                        34)))
                    .build())
                .build());
    
        }
    }
    
    resources:
      exampleOrgUnit:
        type: googleworkspace:OrgUnit
        properties:
          parentOrgUnitPath: /
      exampleChromePolicy:
        type: googleworkspace:ChromePolicy
        properties:
          orgUnitId: ${googleworkspace_org_unit.test.id}
          policies:
            - schemaName: chrome.users.MaxConnectionsPerProxy
              schemaValues:
                maxConnectionsPerProxy:
                  fn::toJSON: 34
    

    Create ChromePolicy Resource

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

    Constructor syntax

    new ChromePolicy(name: string, args: ChromePolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ChromePolicy(resource_name: str,
                     args: ChromePolicyArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ChromePolicy(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     org_unit_id: Optional[str] = None,
                     policies: Optional[Sequence[ChromePolicyPolicyArgs]] = None,
                     chrome_policy_id: Optional[str] = None)
    func NewChromePolicy(ctx *Context, name string, args ChromePolicyArgs, opts ...ResourceOption) (*ChromePolicy, error)
    public ChromePolicy(string name, ChromePolicyArgs args, CustomResourceOptions? opts = null)
    public ChromePolicy(String name, ChromePolicyArgs args)
    public ChromePolicy(String name, ChromePolicyArgs args, CustomResourceOptions options)
    
    type: googleworkspace:ChromePolicy
    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 ChromePolicyArgs
    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 ChromePolicyArgs
    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 ChromePolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ChromePolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ChromePolicyArgs
    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 chromePolicyResource = new Googleworkspace.ChromePolicy("chromePolicyResource", new()
    {
        OrgUnitId = "string",
        Policies = new[]
        {
            new Googleworkspace.Inputs.ChromePolicyPolicyArgs
            {
                SchemaName = "string",
                SchemaValues = 
                {
                    { "string", "string" },
                },
            },
        },
        ChromePolicyId = "string",
    });
    
    example, err := googleworkspace.NewChromePolicy(ctx, "chromePolicyResource", &googleworkspace.ChromePolicyArgs{
    OrgUnitId: pulumi.String("string"),
    Policies: .ChromePolicyPolicyArray{
    &.ChromePolicyPolicyArgs{
    SchemaName: pulumi.String("string"),
    SchemaValues: pulumi.StringMap{
    "string": pulumi.String("string"),
    },
    },
    },
    ChromePolicyId: pulumi.String("string"),
    })
    
    var chromePolicyResource = new ChromePolicy("chromePolicyResource", ChromePolicyArgs.builder()
        .orgUnitId("string")
        .policies(ChromePolicyPolicyArgs.builder()
            .schemaName("string")
            .schemaValues(Map.of("string", "string"))
            .build())
        .chromePolicyId("string")
        .build());
    
    chrome_policy_resource = googleworkspace.ChromePolicy("chromePolicyResource",
        org_unit_id="string",
        policies=[{
            "schema_name": "string",
            "schema_values": {
                "string": "string",
            },
        }],
        chrome_policy_id="string")
    
    const chromePolicyResource = new googleworkspace.ChromePolicy("chromePolicyResource", {
        orgUnitId: "string",
        policies: [{
            schemaName: "string",
            schemaValues: {
                string: "string",
            },
        }],
        chromePolicyId: "string",
    });
    
    type: googleworkspace:ChromePolicy
    properties:
        chromePolicyId: string
        orgUnitId: string
        policies:
            - schemaName: string
              schemaValues:
                string: string
    

    ChromePolicy 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 ChromePolicy resource accepts the following input properties:

    OrgUnitId string
    The target org unit on which this policy is applied.
    Policies List<ChromePolicyPolicy>
    Policies to set for the org unit
    ChromePolicyId string
    The ID of this resource.
    OrgUnitId string
    The target org unit on which this policy is applied.
    Policies []ChromePolicyPolicyArgs
    Policies to set for the org unit
    ChromePolicyId string
    The ID of this resource.
    orgUnitId String
    The target org unit on which this policy is applied.
    policies List<ChromePolicyPolicy>
    Policies to set for the org unit
    chromePolicyId String
    The ID of this resource.
    orgUnitId string
    The target org unit on which this policy is applied.
    policies ChromePolicyPolicy[]
    Policies to set for the org unit
    chromePolicyId string
    The ID of this resource.
    org_unit_id str
    The target org unit on which this policy is applied.
    policies Sequence[ChromePolicyPolicyArgs]
    Policies to set for the org unit
    chrome_policy_id str
    The ID of this resource.
    orgUnitId String
    The target org unit on which this policy is applied.
    policies List<Property Map>
    Policies to set for the org unit
    chromePolicyId String
    The ID of this resource.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ChromePolicy Resource

    Get an existing ChromePolicy 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?: ChromePolicyState, opts?: CustomResourceOptions): ChromePolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            chrome_policy_id: Optional[str] = None,
            org_unit_id: Optional[str] = None,
            policies: Optional[Sequence[ChromePolicyPolicyArgs]] = None) -> ChromePolicy
    func GetChromePolicy(ctx *Context, name string, id IDInput, state *ChromePolicyState, opts ...ResourceOption) (*ChromePolicy, error)
    public static ChromePolicy Get(string name, Input<string> id, ChromePolicyState? state, CustomResourceOptions? opts = null)
    public static ChromePolicy get(String name, Output<String> id, ChromePolicyState state, CustomResourceOptions options)
    resources:  _:    type: googleworkspace:ChromePolicy    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:
    ChromePolicyId string
    The ID of this resource.
    OrgUnitId string
    The target org unit on which this policy is applied.
    Policies List<ChromePolicyPolicy>
    Policies to set for the org unit
    ChromePolicyId string
    The ID of this resource.
    OrgUnitId string
    The target org unit on which this policy is applied.
    Policies []ChromePolicyPolicyArgs
    Policies to set for the org unit
    chromePolicyId String
    The ID of this resource.
    orgUnitId String
    The target org unit on which this policy is applied.
    policies List<ChromePolicyPolicy>
    Policies to set for the org unit
    chromePolicyId string
    The ID of this resource.
    orgUnitId string
    The target org unit on which this policy is applied.
    policies ChromePolicyPolicy[]
    Policies to set for the org unit
    chrome_policy_id str
    The ID of this resource.
    org_unit_id str
    The target org unit on which this policy is applied.
    policies Sequence[ChromePolicyPolicyArgs]
    Policies to set for the org unit
    chromePolicyId String
    The ID of this resource.
    orgUnitId String
    The target org unit on which this policy is applied.
    policies List<Property Map>
    Policies to set for the org unit

    Supporting Types

    ChromePolicyPolicy, ChromePolicyPolicyArgs

    SchemaName string
    The full qualified name of the policy schema.
    SchemaValues Dictionary<string, string>
    JSON encoded map that represents key/value pairs that correspond to the given schema.
    SchemaName string
    The full qualified name of the policy schema.
    SchemaValues map[string]string
    JSON encoded map that represents key/value pairs that correspond to the given schema.
    schemaName String
    The full qualified name of the policy schema.
    schemaValues Map<String,String>
    JSON encoded map that represents key/value pairs that correspond to the given schema.
    schemaName string
    The full qualified name of the policy schema.
    schemaValues {[key: string]: string}
    JSON encoded map that represents key/value pairs that correspond to the given schema.
    schema_name str
    The full qualified name of the policy schema.
    schema_values Mapping[str, str]
    JSON encoded map that represents key/value pairs that correspond to the given schema.
    schemaName String
    The full qualified name of the policy schema.
    schemaValues Map<String>
    JSON encoded map that represents key/value pairs that correspond to the given schema.

    Package Details

    Repository
    googleworkspace hashicorp/terraform-provider-googleworkspace
    License
    Notes
    This Pulumi package is based on the googleworkspace Terraform Provider.
    googleworkspace logo
    googleworkspace 0.7.0 published on Wednesday, Jan 15, 2025 by hashicorp