1. Packages
  2. Vra Provider
  3. API Docs
  4. ContentSharingPolicy
vra 0.14.0 published on Saturday, Jul 12, 2025 by vmware

vra.ContentSharingPolicy

Explore with Pulumi AI

vra logo
vra 0.14.0 published on Saturday, Jul 12, 2025 by vmware

    Creates a VMware Aria Automation content sharing policy resource.

    Example Usage

    S

    The following example shows how to create a content sharing policy resource:

    To share the content with a specific set of users:

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = new vra.ContentSharingPolicy("this", {
        description: "My Content Sharing Policy",
        projectId: _var.project_id,
        entitlementType: "USER",
        principals: [{
            referenceId: _var.username,
            type: "USER",
        }],
        catalogItemIds: [_var.catalog_item_id],
        catalogSourceIds: [_var.catalog_source_id],
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.ContentSharingPolicy("this",
        description="My Content Sharing Policy",
        project_id=var["project_id"],
        entitlement_type="USER",
        principals=[{
            "reference_id": var["username"],
            "type": "USER",
        }],
        catalog_item_ids=[var["catalog_item_id"]],
        catalog_source_ids=[var["catalog_source_id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vra.NewContentSharingPolicy(ctx, "this", &vra.ContentSharingPolicyArgs{
    			Description:     pulumi.String("My Content Sharing Policy"),
    			ProjectId:       pulumi.Any(_var.Project_id),
    			EntitlementType: pulumi.String("USER"),
    			Principals: vra.ContentSharingPolicyPrincipalArray{
    				&vra.ContentSharingPolicyPrincipalArgs{
    					ReferenceId: pulumi.Any(_var.Username),
    					Type:        pulumi.String("USER"),
    				},
    			},
    			CatalogItemIds: pulumi.StringArray{
    				_var.Catalog_item_id,
    			},
    			CatalogSourceIds: pulumi.StringArray{
    				_var.Catalog_source_id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vra = Pulumi.Vra;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Vra.ContentSharingPolicy("this", new()
        {
            Description = "My Content Sharing Policy",
            ProjectId = @var.Project_id,
            EntitlementType = "USER",
            Principals = new[]
            {
                new Vra.Inputs.ContentSharingPolicyPrincipalArgs
                {
                    ReferenceId = @var.Username,
                    Type = "USER",
                },
            },
            CatalogItemIds = new[]
            {
                @var.Catalog_item_id,
            },
            CatalogSourceIds = new[]
            {
                @var.Catalog_source_id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vra.ContentSharingPolicy;
    import com.pulumi.vra.ContentSharingPolicyArgs;
    import com.pulumi.vra.inputs.ContentSharingPolicyPrincipalArgs;
    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 this_ = new ContentSharingPolicy("this", ContentSharingPolicyArgs.builder()
                .description("My Content Sharing Policy")
                .projectId(var_.project_id())
                .entitlementType("USER")
                .principals(ContentSharingPolicyPrincipalArgs.builder()
                    .referenceId(var_.username())
                    .type("USER")
                    .build())
                .catalogItemIds(var_.catalog_item_id())
                .catalogSourceIds(var_.catalog_source_id())
                .build());
    
        }
    }
    
    resources:
      this:
        type: vra:ContentSharingPolicy
        properties:
          description: My Content Sharing Policy
          projectId: ${var.project_id}
          entitlementType: USER
          principals:
            - referenceId: ${var.username}
              type: USER
          catalogItemIds:
            - ${var.catalog_item_id}
          catalogSourceIds:
            - ${var.catalog_source_id}
    

    To share the content with a specific set of roles:

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = new vra.ContentSharingPolicy("this", {
        description: "My Content Sharing Policy",
        projectId: _var.project_id,
        entitlementType: "ROLE",
        principals: [{
            referenceId: _var.role,
            type: "ROLE",
        }],
        catalogItemIds: [_var.catalog_item_id],
        catalogSourceIds: [_var.catalog_source_id],
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.ContentSharingPolicy("this",
        description="My Content Sharing Policy",
        project_id=var["project_id"],
        entitlement_type="ROLE",
        principals=[{
            "reference_id": var["role"],
            "type": "ROLE",
        }],
        catalog_item_ids=[var["catalog_item_id"]],
        catalog_source_ids=[var["catalog_source_id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vra.NewContentSharingPolicy(ctx, "this", &vra.ContentSharingPolicyArgs{
    			Description:     pulumi.String("My Content Sharing Policy"),
    			ProjectId:       pulumi.Any(_var.Project_id),
    			EntitlementType: pulumi.String("ROLE"),
    			Principals: vra.ContentSharingPolicyPrincipalArray{
    				&vra.ContentSharingPolicyPrincipalArgs{
    					ReferenceId: pulumi.Any(_var.Role),
    					Type:        pulumi.String("ROLE"),
    				},
    			},
    			CatalogItemIds: pulumi.StringArray{
    				_var.Catalog_item_id,
    			},
    			CatalogSourceIds: pulumi.StringArray{
    				_var.Catalog_source_id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vra = Pulumi.Vra;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Vra.ContentSharingPolicy("this", new()
        {
            Description = "My Content Sharing Policy",
            ProjectId = @var.Project_id,
            EntitlementType = "ROLE",
            Principals = new[]
            {
                new Vra.Inputs.ContentSharingPolicyPrincipalArgs
                {
                    ReferenceId = @var.Role,
                    Type = "ROLE",
                },
            },
            CatalogItemIds = new[]
            {
                @var.Catalog_item_id,
            },
            CatalogSourceIds = new[]
            {
                @var.Catalog_source_id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vra.ContentSharingPolicy;
    import com.pulumi.vra.ContentSharingPolicyArgs;
    import com.pulumi.vra.inputs.ContentSharingPolicyPrincipalArgs;
    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 this_ = new ContentSharingPolicy("this", ContentSharingPolicyArgs.builder()
                .description("My Content Sharing Policy")
                .projectId(var_.project_id())
                .entitlementType("ROLE")
                .principals(ContentSharingPolicyPrincipalArgs.builder()
                    .referenceId(var_.role())
                    .type("ROLE")
                    .build())
                .catalogItemIds(var_.catalog_item_id())
                .catalogSourceIds(var_.catalog_source_id())
                .build());
    
        }
    }
    
    resources:
      this:
        type: vra:ContentSharingPolicy
        properties:
          description: My Content Sharing Policy
          projectId: ${var.project_id}
          entitlementType: ROLE
          principals:
            - referenceId: ${var.role}
              type: ROLE
          catalogItemIds:
            - ${var.catalog_item_id}
          catalogSourceIds:
            - ${var.catalog_source_id}
    

    To share the content with all users and groups in the project or organization:

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = new vra.ContentSharingPolicy("this", {
        description: "My Content Sharing Policy",
        projectId: _var.project_id,
        entitlementType: "USER",
        principals: [{
            referenceId: "",
            type: "PROJECT",
        }],
        catalogItemIds: [_var.catalog_item_id],
        catalogSourceIds: [_var.catalog_source_id],
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.ContentSharingPolicy("this",
        description="My Content Sharing Policy",
        project_id=var["project_id"],
        entitlement_type="USER",
        principals=[{
            "reference_id": "",
            "type": "PROJECT",
        }],
        catalog_item_ids=[var["catalog_item_id"]],
        catalog_source_ids=[var["catalog_source_id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vra.NewContentSharingPolicy(ctx, "this", &vra.ContentSharingPolicyArgs{
    			Description:     pulumi.String("My Content Sharing Policy"),
    			ProjectId:       pulumi.Any(_var.Project_id),
    			EntitlementType: pulumi.String("USER"),
    			Principals: vra.ContentSharingPolicyPrincipalArray{
    				&vra.ContentSharingPolicyPrincipalArgs{
    					ReferenceId: pulumi.String(""),
    					Type:        pulumi.String("PROJECT"),
    				},
    			},
    			CatalogItemIds: pulumi.StringArray{
    				_var.Catalog_item_id,
    			},
    			CatalogSourceIds: pulumi.StringArray{
    				_var.Catalog_source_id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vra = Pulumi.Vra;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Vra.ContentSharingPolicy("this", new()
        {
            Description = "My Content Sharing Policy",
            ProjectId = @var.Project_id,
            EntitlementType = "USER",
            Principals = new[]
            {
                new Vra.Inputs.ContentSharingPolicyPrincipalArgs
                {
                    ReferenceId = "",
                    Type = "PROJECT",
                },
            },
            CatalogItemIds = new[]
            {
                @var.Catalog_item_id,
            },
            CatalogSourceIds = new[]
            {
                @var.Catalog_source_id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vra.ContentSharingPolicy;
    import com.pulumi.vra.ContentSharingPolicyArgs;
    import com.pulumi.vra.inputs.ContentSharingPolicyPrincipalArgs;
    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 this_ = new ContentSharingPolicy("this", ContentSharingPolicyArgs.builder()
                .description("My Content Sharing Policy")
                .projectId(var_.project_id())
                .entitlementType("USER")
                .principals(ContentSharingPolicyPrincipalArgs.builder()
                    .referenceId("")
                    .type("PROJECT")
                    .build())
                .catalogItemIds(var_.catalog_item_id())
                .catalogSourceIds(var_.catalog_source_id())
                .build());
    
        }
    }
    
    resources:
      this:
        type: vra:ContentSharingPolicy
        properties:
          description: My Content Sharing Policy
          projectId: ${var.project_id}
          entitlementType: USER
          principals:
            - referenceId: ""
              type: PROJECT
          catalogItemIds:
            - ${var.catalog_item_id}
          catalogSourceIds:
            - ${var.catalog_source_id}
    

    Create ContentSharingPolicy Resource

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

    Constructor syntax

    new ContentSharingPolicy(name: string, args?: ContentSharingPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def ContentSharingPolicy(resource_name: str,
                             args: Optional[ContentSharingPolicyArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContentSharingPolicy(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             catalog_item_ids: Optional[Sequence[str]] = None,
                             catalog_source_ids: Optional[Sequence[str]] = None,
                             content_sharing_policy_id: Optional[str] = None,
                             description: Optional[str] = None,
                             entitlement_type: Optional[str] = None,
                             name: Optional[str] = None,
                             principals: Optional[Sequence[ContentSharingPolicyPrincipalArgs]] = None,
                             project_criterias: Optional[Sequence[Mapping[str, str]]] = None,
                             project_id: Optional[str] = None)
    func NewContentSharingPolicy(ctx *Context, name string, args *ContentSharingPolicyArgs, opts ...ResourceOption) (*ContentSharingPolicy, error)
    public ContentSharingPolicy(string name, ContentSharingPolicyArgs? args = null, CustomResourceOptions? opts = null)
    public ContentSharingPolicy(String name, ContentSharingPolicyArgs args)
    public ContentSharingPolicy(String name, ContentSharingPolicyArgs args, CustomResourceOptions options)
    
    type: vra:ContentSharingPolicy
    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 ContentSharingPolicyArgs
    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 ContentSharingPolicyArgs
    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 ContentSharingPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContentSharingPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContentSharingPolicyArgs
    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 contentSharingPolicyResource = new Vra.ContentSharingPolicy("contentSharingPolicyResource", new()
    {
        CatalogItemIds = new[]
        {
            "string",
        },
        CatalogSourceIds = new[]
        {
            "string",
        },
        ContentSharingPolicyId = "string",
        Description = "string",
        EntitlementType = "string",
        Name = "string",
        Principals = new[]
        {
            new Vra.Inputs.ContentSharingPolicyPrincipalArgs
            {
                Type = "string",
                ReferenceId = "string",
            },
        },
        ProjectCriterias = new[]
        {
            
            {
                { "string", "string" },
            },
        },
        ProjectId = "string",
    });
    
    example, err := vra.NewContentSharingPolicy(ctx, "contentSharingPolicyResource", &vra.ContentSharingPolicyArgs{
    	CatalogItemIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CatalogSourceIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ContentSharingPolicyId: pulumi.String("string"),
    	Description:            pulumi.String("string"),
    	EntitlementType:        pulumi.String("string"),
    	Name:                   pulumi.String("string"),
    	Principals: vra.ContentSharingPolicyPrincipalArray{
    		&vra.ContentSharingPolicyPrincipalArgs{
    			Type:        pulumi.String("string"),
    			ReferenceId: pulumi.String("string"),
    		},
    	},
    	ProjectCriterias: pulumi.StringMapArray{
    		pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    	},
    	ProjectId: pulumi.String("string"),
    })
    
    var contentSharingPolicyResource = new ContentSharingPolicy("contentSharingPolicyResource", ContentSharingPolicyArgs.builder()
        .catalogItemIds("string")
        .catalogSourceIds("string")
        .contentSharingPolicyId("string")
        .description("string")
        .entitlementType("string")
        .name("string")
        .principals(ContentSharingPolicyPrincipalArgs.builder()
            .type("string")
            .referenceId("string")
            .build())
        .projectCriterias(Map.of("string", "string"))
        .projectId("string")
        .build());
    
    content_sharing_policy_resource = vra.ContentSharingPolicy("contentSharingPolicyResource",
        catalog_item_ids=["string"],
        catalog_source_ids=["string"],
        content_sharing_policy_id="string",
        description="string",
        entitlement_type="string",
        name="string",
        principals=[{
            "type": "string",
            "reference_id": "string",
        }],
        project_criterias=[{
            "string": "string",
        }],
        project_id="string")
    
    const contentSharingPolicyResource = new vra.ContentSharingPolicy("contentSharingPolicyResource", {
        catalogItemIds: ["string"],
        catalogSourceIds: ["string"],
        contentSharingPolicyId: "string",
        description: "string",
        entitlementType: "string",
        name: "string",
        principals: [{
            type: "string",
            referenceId: "string",
        }],
        projectCriterias: [{
            string: "string",
        }],
        projectId: "string",
    });
    
    type: vra:ContentSharingPolicy
    properties:
        catalogItemIds:
            - string
        catalogSourceIds:
            - string
        contentSharingPolicyId: string
        description: string
        entitlementType: string
        name: string
        principals:
            - referenceId: string
              type: string
        projectCriterias:
            - string: string
        projectId: string
    

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

    CatalogItemIds List<string>
    List of catalog item ids to share.
    CatalogSourceIds List<string>
    List of catalog source ids to share
    ContentSharingPolicyId string
    Description string
    A human-friendly description for the policy instance.
    EntitlementType string
    Entitlement type. Supported values: USER, ROLE.
    Name string
    The name of the policy instance.
    Principals List<ContentSharingPolicyPrincipal>
    List of users or roles that can share content:
    ProjectCriterias List<ImmutableDictionary<string, string>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    ProjectId string

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    CatalogItemIds []string
    List of catalog item ids to share.
    CatalogSourceIds []string
    List of catalog source ids to share
    ContentSharingPolicyId string
    Description string
    A human-friendly description for the policy instance.
    EntitlementType string
    Entitlement type. Supported values: USER, ROLE.
    Name string
    The name of the policy instance.
    Principals []ContentSharingPolicyPrincipalArgs
    List of users or roles that can share content:
    ProjectCriterias []map[string]string
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    ProjectId string

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    catalogItemIds List<String>
    List of catalog item ids to share.
    catalogSourceIds List<String>
    List of catalog source ids to share
    contentSharingPolicyId String
    description String
    A human-friendly description for the policy instance.
    entitlementType String
    Entitlement type. Supported values: USER, ROLE.
    name String
    The name of the policy instance.
    principals List<ContentSharingPolicyPrincipal>
    List of users or roles that can share content:
    projectCriterias List<Map<String,String>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId String

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    catalogItemIds string[]
    List of catalog item ids to share.
    catalogSourceIds string[]
    List of catalog source ids to share
    contentSharingPolicyId string
    description string
    A human-friendly description for the policy instance.
    entitlementType string
    Entitlement type. Supported values: USER, ROLE.
    name string
    The name of the policy instance.
    principals ContentSharingPolicyPrincipal[]
    List of users or roles that can share content:
    projectCriterias {[key: string]: string}[]
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId string

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    catalog_item_ids Sequence[str]
    List of catalog item ids to share.
    catalog_source_ids Sequence[str]
    List of catalog source ids to share
    content_sharing_policy_id str
    description str
    A human-friendly description for the policy instance.
    entitlement_type str
    Entitlement type. Supported values: USER, ROLE.
    name str
    The name of the policy instance.
    principals Sequence[ContentSharingPolicyPrincipalArgs]
    List of users or roles that can share content:
    project_criterias Sequence[Mapping[str, str]]
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    project_id str

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    catalogItemIds List<String>
    List of catalog item ids to share.
    catalogSourceIds List<String>
    List of catalog source ids to share
    contentSharingPolicyId String
    description String
    A human-friendly description for the policy instance.
    entitlementType String
    Entitlement type. Supported values: USER, ROLE.
    name String
    The name of the policy instance.
    principals List<Property Map>
    List of users or roles that can share content:
    projectCriterias List<Map<String>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId String

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    Outputs

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

    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    he user the entity was created by.
    EnforcementType string
    The type of enforcement for the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    OrgId string
    The id of the organization this entity belongs to.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    he user the entity was created by.
    EnforcementType string
    The type of enforcement for the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    OrgId string
    The id of the organization this entity belongs to.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    he user the entity was created by.
    enforcementType String
    The type of enforcement for the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    orgId String
    The id of the organization this entity belongs to.
    createdAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy string
    he user the entity was created by.
    enforcementType string
    The type of enforcement for the policy.
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy string
    The user the entity was last updated by.
    orgId string
    The id of the organization this entity belongs to.
    created_at str
    Date when the entity was created. The date is in ISO 8601 and UTC.
    created_by str
    he user the entity was created by.
    enforcement_type str
    The type of enforcement for the policy.
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated_at str
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    last_updated_by str
    The user the entity was last updated by.
    org_id str
    The id of the organization this entity belongs to.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    he user the entity was created by.
    enforcementType String
    The type of enforcement for the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    orgId String
    The id of the organization this entity belongs to.

    Look up Existing ContentSharingPolicy Resource

    Get an existing ContentSharingPolicy 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?: ContentSharingPolicyState, opts?: CustomResourceOptions): ContentSharingPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            catalog_item_ids: Optional[Sequence[str]] = None,
            catalog_source_ids: Optional[Sequence[str]] = None,
            content_sharing_policy_id: Optional[str] = None,
            created_at: Optional[str] = None,
            created_by: Optional[str] = None,
            description: Optional[str] = None,
            enforcement_type: Optional[str] = None,
            entitlement_type: Optional[str] = None,
            last_updated_at: Optional[str] = None,
            last_updated_by: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            principals: Optional[Sequence[ContentSharingPolicyPrincipalArgs]] = None,
            project_criterias: Optional[Sequence[Mapping[str, str]]] = None,
            project_id: Optional[str] = None) -> ContentSharingPolicy
    func GetContentSharingPolicy(ctx *Context, name string, id IDInput, state *ContentSharingPolicyState, opts ...ResourceOption) (*ContentSharingPolicy, error)
    public static ContentSharingPolicy Get(string name, Input<string> id, ContentSharingPolicyState? state, CustomResourceOptions? opts = null)
    public static ContentSharingPolicy get(String name, Output<String> id, ContentSharingPolicyState state, CustomResourceOptions options)
    resources:  _:    type: vra:ContentSharingPolicy    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:
    CatalogItemIds List<string>
    List of catalog item ids to share.
    CatalogSourceIds List<string>
    List of catalog source ids to share
    ContentSharingPolicyId string
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    he user the entity was created by.
    Description string
    A human-friendly description for the policy instance.
    EnforcementType string
    The type of enforcement for the policy.
    EntitlementType string
    Entitlement type. Supported values: USER, ROLE.
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    The name of the policy instance.
    OrgId string
    The id of the organization this entity belongs to.
    Principals List<ContentSharingPolicyPrincipal>
    List of users or roles that can share content:
    ProjectCriterias List<ImmutableDictionary<string, string>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    ProjectId string

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    CatalogItemIds []string
    List of catalog item ids to share.
    CatalogSourceIds []string
    List of catalog source ids to share
    ContentSharingPolicyId string
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    he user the entity was created by.
    Description string
    A human-friendly description for the policy instance.
    EnforcementType string
    The type of enforcement for the policy.
    EntitlementType string
    Entitlement type. Supported values: USER, ROLE.
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    The name of the policy instance.
    OrgId string
    The id of the organization this entity belongs to.
    Principals []ContentSharingPolicyPrincipalArgs
    List of users or roles that can share content:
    ProjectCriterias []map[string]string
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    ProjectId string

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    catalogItemIds List<String>
    List of catalog item ids to share.
    catalogSourceIds List<String>
    List of catalog source ids to share
    contentSharingPolicyId String
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    he user the entity was created by.
    description String
    A human-friendly description for the policy instance.
    enforcementType String
    The type of enforcement for the policy.
    entitlementType String
    Entitlement type. Supported values: USER, ROLE.
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    The name of the policy instance.
    orgId String
    The id of the organization this entity belongs to.
    principals List<ContentSharingPolicyPrincipal>
    List of users or roles that can share content:
    projectCriterias List<Map<String,String>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId String

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    catalogItemIds string[]
    List of catalog item ids to share.
    catalogSourceIds string[]
    List of catalog source ids to share
    contentSharingPolicyId string
    createdAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy string
    he user the entity was created by.
    description string
    A human-friendly description for the policy instance.
    enforcementType string
    The type of enforcement for the policy.
    entitlementType string
    Entitlement type. Supported values: USER, ROLE.
    lastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy string
    The user the entity was last updated by.
    name string
    The name of the policy instance.
    orgId string
    The id of the organization this entity belongs to.
    principals ContentSharingPolicyPrincipal[]
    List of users or roles that can share content:
    projectCriterias {[key: string]: string}[]
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId string

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    catalog_item_ids Sequence[str]
    List of catalog item ids to share.
    catalog_source_ids Sequence[str]
    List of catalog source ids to share
    content_sharing_policy_id str
    created_at str
    Date when the entity was created. The date is in ISO 8601 and UTC.
    created_by str
    he user the entity was created by.
    description str
    A human-friendly description for the policy instance.
    enforcement_type str
    The type of enforcement for the policy.
    entitlement_type str
    Entitlement type. Supported values: USER, ROLE.
    last_updated_at str
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    last_updated_by str
    The user the entity was last updated by.
    name str
    The name of the policy instance.
    org_id str
    The id of the organization this entity belongs to.
    principals Sequence[ContentSharingPolicyPrincipalArgs]
    List of users or roles that can share content:
    project_criterias Sequence[Mapping[str, str]]
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    project_id str

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    catalogItemIds List<String>
    List of catalog item ids to share.
    catalogSourceIds List<String>
    List of catalog source ids to share
    contentSharingPolicyId String
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    he user the entity was created by.
    description String
    A human-friendly description for the policy instance.
    enforcementType String
    The type of enforcement for the policy.
    entitlementType String
    Entitlement type. Supported values: USER, ROLE.
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    The name of the policy instance.
    orgId String
    The id of the organization this entity belongs to.
    principals List<Property Map>
    List of users or roles that can share content:
    projectCriterias List<Map<String>>
    The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when project_id is set.
    projectId String

    The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.

    Note: One of catalog_item_ids or catalog_source_ids must be specified.

    Supporting Types

    ContentSharingPolicyPrincipal, ContentSharingPolicyPrincipalArgs

    Type string
    The type of the principal.
    ReferenceId string
    The reference ID of the principal.
    Type string
    The type of the principal.
    ReferenceId string
    The reference ID of the principal.
    type String
    The type of the principal.
    referenceId String
    The reference ID of the principal.
    type string
    The type of the principal.
    referenceId string
    The reference ID of the principal.
    type str
    The type of the principal.
    reference_id str
    The reference ID of the principal.
    type String
    The type of the principal.
    referenceId String
    The reference ID of the principal.

    Import

    To import an existing content sharing policy, use the id as in the following example:

    $ pulumi import vra:index/contentSharingPolicy:ContentSharingPolicy `vra_content_sharing_policy 87c17193-39ee-4921-9a11-7e03e3df6029`
    

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

    Package Details

    Repository
    vra vmware/terraform-provider-vra
    License
    Notes
    This Pulumi package is based on the vra Terraform Provider.
    vra logo
    vra 0.14.0 published on Saturday, Jul 12, 2025 by vmware