vra.ContentSharingPolicy
Explore with Pulumi AI
Creates a VMware vRealize Automation Content Sharing Policy resource.
Example Usage
S
The following example shows how to create a Content Sharing Policy resource:
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,
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"],
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),
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,
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 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())
.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}
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: ContentSharingPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ContentSharingPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = 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,
name: Optional[str] = None)
func NewContentSharingPolicy(ctx *Context, name string, args ContentSharingPolicyArgs, opts ...ResourceOption) (*ContentSharingPolicy, error)
public ContentSharingPolicy(string name, ContentSharingPolicyArgs args, 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()
{
ProjectId = "string",
CatalogItemIds = new[]
{
"string",
},
CatalogSourceIds = new[]
{
"string",
},
ContentSharingPolicyId = "string",
Description = "string",
Name = "string",
});
example, err := vra.NewContentSharingPolicy(ctx, "contentSharingPolicyResource", &vra.ContentSharingPolicyArgs{
ProjectId: pulumi.String("string"),
CatalogItemIds: pulumi.StringArray{
pulumi.String("string"),
},
CatalogSourceIds: pulumi.StringArray{
pulumi.String("string"),
},
ContentSharingPolicyId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
var contentSharingPolicyResource = new ContentSharingPolicy("contentSharingPolicyResource", ContentSharingPolicyArgs.builder()
.projectId("string")
.catalogItemIds("string")
.catalogSourceIds("string")
.contentSharingPolicyId("string")
.description("string")
.name("string")
.build());
content_sharing_policy_resource = vra.ContentSharingPolicy("contentSharingPolicyResource",
project_id="string",
catalog_item_ids=["string"],
catalog_source_ids=["string"],
content_sharing_policy_id="string",
description="string",
name="string")
const contentSharingPolicyResource = new vra.ContentSharingPolicy("contentSharingPolicyResource", {
projectId: "string",
catalogItemIds: ["string"],
catalogSourceIds: ["string"],
contentSharingPolicyId: "string",
description: "string",
name: "string",
});
type: vra:ContentSharingPolicy
properties:
catalogItemIds:
- string
catalogSourceIds:
- string
contentSharingPolicyId: string
description: string
name: 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:
- Project
Id string The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.- Catalog
Item List<string>Ids - List of catalog item ids to share.
- Catalog
Source List<string>Ids - List of catalog source ids to share.
- Content
Sharing stringPolicy Id - Description string
- The policy description.
- Name string
- The policy name.
- Project
Id string The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.- Catalog
Item []stringIds - List of catalog item ids to share.
- Catalog
Source []stringIds - List of catalog source ids to share.
- Content
Sharing stringPolicy Id - Description string
- The policy description.
- Name string
- The policy name.
- project
Id String The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.- catalog
Item List<String>Ids - List of catalog item ids to share.
- catalog
Source List<String>Ids - List of catalog source ids to share.
- content
Sharing StringPolicy Id - description String
- The policy description.
- name String
- The policy name.
- project
Id string The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.- catalog
Item string[]Ids - List of catalog item ids to share.
- catalog
Source string[]Ids - List of catalog source ids to share.
- content
Sharing stringPolicy Id - description string
- The policy description.
- name string
- The policy name.
- project_
id str The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.- catalog_
item_ Sequence[str]ids - List of catalog item ids to share.
- catalog_
source_ Sequence[str]ids - List of catalog source ids to share.
- content_
sharing_ strpolicy_ id - description str
- The policy description.
- name str
- The policy name.
- project
Id String The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.- catalog
Item List<String>Ids - List of catalog item ids to share.
- catalog
Source List<String>Ids - List of catalog source ids to share.
- content
Sharing StringPolicy Id - description String
- The policy description.
- name String
- The policy name.
Outputs
All input properties are implicitly available as output properties. Additionally, the ContentSharingPolicy resource produces the following output properties:
- Created
At string - Policy creation timestamp.
- Created
By string - Policy author.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringAt - Most recent policy update timestamp.
- Last
Updated stringBy - Most recent policy editor.
- Org
Id string - The ID of the organization to which the policy belongs.
- Created
At string - Policy creation timestamp.
- Created
By string - Policy author.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated stringAt - Most recent policy update timestamp.
- Last
Updated stringBy - Most recent policy editor.
- Org
Id string - The ID of the organization to which the policy belongs.
- created
At String - Policy creation timestamp.
- created
By String - Policy author.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated StringAt - Most recent policy update timestamp.
- last
Updated StringBy - Most recent policy editor.
- org
Id String - The ID of the organization to which the policy belongs.
- created
At string - Policy creation timestamp.
- created
By string - Policy author.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated stringAt - Most recent policy update timestamp.
- last
Updated stringBy - Most recent policy editor.
- org
Id string - The ID of the organization to which the policy belongs.
- created_
at str - Policy creation timestamp.
- created_
by str - Policy author.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated_ strat - Most recent policy update timestamp.
- last_
updated_ strby - Most recent policy editor.
- org_
id str - The ID of the organization to which the policy belongs.
- created
At String - Policy creation timestamp.
- created
By String - Policy author.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated StringAt - Most recent policy update timestamp.
- last
Updated StringBy - Most recent policy editor.
- org
Id String - The ID of the organization to which the policy belongs.
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,
last_updated_at: Optional[str] = None,
last_updated_by: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[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.
- Catalog
Item List<string>Ids - List of catalog item ids to share.
- Catalog
Source List<string>Ids - List of catalog source ids to share.
- Content
Sharing stringPolicy Id - Created
At string - Policy creation timestamp.
- Created
By string - Policy author.
- Description string
- The policy description.
- Last
Updated stringAt - Most recent policy update timestamp.
- Last
Updated stringBy - Most recent policy editor.
- Name string
- The policy name.
- Org
Id string - The ID of the organization to which the policy belongs.
- Project
Id string The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.
- Catalog
Item []stringIds - List of catalog item ids to share.
- Catalog
Source []stringIds - List of catalog source ids to share.
- Content
Sharing stringPolicy Id - Created
At string - Policy creation timestamp.
- Created
By string - Policy author.
- Description string
- The policy description.
- Last
Updated stringAt - Most recent policy update timestamp.
- Last
Updated stringBy - Most recent policy editor.
- Name string
- The policy name.
- Org
Id string - The ID of the organization to which the policy belongs.
- Project
Id string The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.
- catalog
Item List<String>Ids - List of catalog item ids to share.
- catalog
Source List<String>Ids - List of catalog source ids to share.
- content
Sharing StringPolicy Id - created
At String - Policy creation timestamp.
- created
By String - Policy author.
- description String
- The policy description.
- last
Updated StringAt - Most recent policy update timestamp.
- last
Updated StringBy - Most recent policy editor.
- name String
- The policy name.
- org
Id String - The ID of the organization to which the policy belongs.
- project
Id String The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.
- catalog
Item string[]Ids - List of catalog item ids to share.
- catalog
Source string[]Ids - List of catalog source ids to share.
- content
Sharing stringPolicy Id - created
At string - Policy creation timestamp.
- created
By string - Policy author.
- description string
- The policy description.
- last
Updated stringAt - Most recent policy update timestamp.
- last
Updated stringBy - Most recent policy editor.
- name string
- The policy name.
- org
Id string - The ID of the organization to which the policy belongs.
- project
Id string The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.
- catalog_
item_ Sequence[str]ids - List of catalog item ids to share.
- catalog_
source_ Sequence[str]ids - List of catalog source ids to share.
- content_
sharing_ strpolicy_ id - created_
at str - Policy creation timestamp.
- created_
by str - Policy author.
- description str
- The policy description.
- last_
updated_ strat - Most recent policy update timestamp.
- last_
updated_ strby - Most recent policy editor.
- name str
- The policy name.
- org_
id str - The ID of the organization to which the policy belongs.
- project_
id str The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.
- catalog
Item List<String>Ids - List of catalog item ids to share.
- catalog
Source List<String>Ids - List of catalog source ids to share.
- content
Sharing StringPolicy Id - created
At String - Policy creation timestamp.
- created
By String - Policy author.
- description String
- The policy description.
- last
Updated StringAt - Most recent policy update timestamp.
- last
Updated StringBy - Most recent policy editor.
- name String
- The policy name.
- org
Id String - The ID of the organization to which the policy belongs.
- project
Id String The ID of the project to which the policy belongs.
Note: One of
catalog_item_ids
orcatalog_source_ids
must be specified.
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.