vra 0.12.0 published on Monday, Apr 14, 2025 by vmware
vra.getContentSharingPolicy
Explore with Pulumi AI
This is an example of how to lookup a content sharing policy data source:
Content sharing policy data source by id:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getContentSharingPolicy({
    id: _var.vra_content_sharing_policy_id,
});
import pulumi
import pulumi_vra as vra
this = vra.get_content_sharing_policy(id=var["vra_content_sharing_policy_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.LookupContentSharingPolicy(ctx, &vra.LookupContentSharingPolicyArgs{
			Id: pulumi.StringRef(_var.Vra_content_sharing_policy_id),
		}, nil)
		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 = Vra.GetContentSharingPolicy.Invoke(new()
    {
        Id = @var.Vra_content_sharing_policy_id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetContentSharingPolicyArgs;
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) {
        final var this = VraFunctions.getContentSharingPolicy(GetContentSharingPolicyArgs.builder()
            .id(var_.vra_content_sharing_policy_id())
            .build());
    }
}
variables:
  this:
    fn::invoke:
      function: vra:getContentSharingPolicy
      arguments:
        id: ${var.vra_content_sharing_policy_id}
Content sharing policy data source by name:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getContentSharingPolicy({
    name: _var.vra_content_sharing_policy_name,
});
import pulumi
import pulumi_vra as vra
this = vra.get_content_sharing_policy(name=var["vra_content_sharing_policy_name"])
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.LookupContentSharingPolicy(ctx, &vra.LookupContentSharingPolicyArgs{
			Name: pulumi.StringRef(_var.Vra_content_sharing_policy_name),
		}, nil)
		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 = Vra.GetContentSharingPolicy.Invoke(new()
    {
        Name = @var.Vra_content_sharing_policy_name,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetContentSharingPolicyArgs;
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) {
        final var this = VraFunctions.getContentSharingPolicy(GetContentSharingPolicyArgs.builder()
            .name(var_.vra_content_sharing_policy_name())
            .build());
    }
}
variables:
  this:
    fn::invoke:
      function: vra:getContentSharingPolicy
      arguments:
        name: ${var.vra_content_sharing_policy_name}
Using getContentSharingPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getContentSharingPolicy(args: GetContentSharingPolicyArgs, opts?: InvokeOptions): Promise<GetContentSharingPolicyResult>
function getContentSharingPolicyOutput(args: GetContentSharingPolicyOutputArgs, opts?: InvokeOptions): Output<GetContentSharingPolicyResult>def get_content_sharing_policy(id: Optional[str] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetContentSharingPolicyResult
def get_content_sharing_policy_output(id: Optional[pulumi.Input[str]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetContentSharingPolicyResult]func LookupContentSharingPolicy(ctx *Context, args *LookupContentSharingPolicyArgs, opts ...InvokeOption) (*LookupContentSharingPolicyResult, error)
func LookupContentSharingPolicyOutput(ctx *Context, args *LookupContentSharingPolicyOutputArgs, opts ...InvokeOption) LookupContentSharingPolicyResultOutput> Note: This function is named LookupContentSharingPolicy in the Go SDK.
public static class GetContentSharingPolicy 
{
    public static Task<GetContentSharingPolicyResult> InvokeAsync(GetContentSharingPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetContentSharingPolicyResult> Invoke(GetContentSharingPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetContentSharingPolicyResult> getContentSharingPolicy(GetContentSharingPolicyArgs args, InvokeOptions options)
public static Output<GetContentSharingPolicyResult> getContentSharingPolicy(GetContentSharingPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: vra:index/getContentSharingPolicy:getContentSharingPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
getContentSharingPolicy Result
The following output properties are available:
- CatalogItem List<string>Ids 
- List of catalog item ids to share.
- CatalogSource List<string>Ids 
- List of catalog source ids to share.
- CreatedAt string
- Policy creation timestamp.
- CreatedBy string
- Policy author.
- Description string
- The policy description.
- Id string
- LastUpdated stringAt 
- Most recent policy update timestamp.
- LastUpdated stringBy 
- Most recent policy editor.
- Name string
- OrgId string
- The ID of the organization to which the policy belongs.
- ProjectId string
- The ID of the project to which the policy belongs.
- CatalogItem []stringIds 
- List of catalog item ids to share.
- CatalogSource []stringIds 
- List of catalog source ids to share.
- CreatedAt string
- Policy creation timestamp.
- CreatedBy string
- Policy author.
- Description string
- The policy description.
- Id string
- LastUpdated stringAt 
- Most recent policy update timestamp.
- LastUpdated stringBy 
- Most recent policy editor.
- Name string
- OrgId string
- The ID of the organization to which the policy belongs.
- ProjectId string
- The ID of the project to which the policy belongs.
- catalogItem List<String>Ids 
- List of catalog item ids to share.
- catalogSource List<String>Ids 
- List of catalog source ids to share.
- createdAt String
- Policy creation timestamp.
- createdBy String
- Policy author.
- description String
- The policy description.
- id String
- lastUpdated StringAt 
- Most recent policy update timestamp.
- lastUpdated StringBy 
- Most recent policy editor.
- name String
- orgId String
- The ID of the organization to which the policy belongs.
- projectId String
- The ID of the project to which the policy belongs.
- catalogItem string[]Ids 
- List of catalog item ids to share.
- catalogSource string[]Ids 
- List of catalog source ids to share.
- createdAt string
- Policy creation timestamp.
- createdBy string
- Policy author.
- description string
- The policy description.
- id string
- lastUpdated stringAt 
- Most recent policy update timestamp.
- lastUpdated stringBy 
- Most recent policy editor.
- name string
- orgId string
- The ID of the organization to which the policy belongs.
- projectId string
- The ID of the project to which the policy belongs.
- catalog_item_ Sequence[str]ids 
- List of catalog item ids to share.
- catalog_source_ Sequence[str]ids 
- List of catalog source ids to share.
- created_at str
- Policy creation timestamp.
- created_by str
- Policy author.
- description str
- The policy description.
- id str
- last_updated_ strat 
- Most recent policy update timestamp.
- last_updated_ strby 
- Most recent policy editor.
- name str
- 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.
- catalogItem List<String>Ids 
- List of catalog item ids to share.
- catalogSource List<String>Ids 
- List of catalog source ids to share.
- createdAt String
- Policy creation timestamp.
- createdBy String
- Policy author.
- description String
- The policy description.
- id String
- lastUpdated StringAt 
- Most recent policy update timestamp.
- lastUpdated StringBy 
- Most recent policy editor.
- name String
- orgId String
- The ID of the organization to which the policy belongs.
- projectId String
- The ID of the project to which the policy belongs.
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the vraTerraform Provider.