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 dictionary
The following arguments are supported:
getContentSharingPolicy Result
The following output properties are available:
- Catalog
Item List<string>Ids - List of catalog item ids to share.
- Catalog
Source List<string>Ids - List of catalog source ids to share.
- Created
At string - Policy creation timestamp.
- Created
By string - Policy author.
- Description string
- The policy description.
- Id string
- Last
Updated stringAt - Most recent policy update timestamp.
- Last
Updated stringBy - Most recent policy editor.
- Name string
- 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.
- Catalog
Item []stringIds - List of catalog item ids to share.
- Catalog
Source []stringIds - List of catalog source ids to share.
- Created
At string - Policy creation timestamp.
- Created
By string - Policy author.
- Description string
- The policy description.
- Id string
- Last
Updated stringAt - Most recent policy update timestamp.
- Last
Updated stringBy - Most recent policy editor.
- Name string
- 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.
- catalog
Item List<String>Ids - List of catalog item ids to share.
- catalog
Source List<String>Ids - List of catalog source ids to share.
- created
At String - Policy creation timestamp.
- created
By String - Policy author.
- description String
- The policy description.
- id String
- last
Updated StringAt - Most recent policy update timestamp.
- last
Updated StringBy - Most recent policy editor.
- name String
- 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.
- catalog
Item string[]Ids - List of catalog item ids to share.
- catalog
Source string[]Ids - List of catalog source ids to share.
- created
At string - Policy creation timestamp.
- created
By string - Policy author.
- description string
- The policy description.
- id string
- last
Updated stringAt - Most recent policy update timestamp.
- last
Updated stringBy - Most recent policy editor.
- name string
- 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.
- 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.
- catalog
Item List<String>Ids - List of catalog item ids to share.
- catalog
Source List<String>Ids - List of catalog source ids to share.
- created
At String - Policy creation timestamp.
- created
By String - Policy author.
- description String
- The policy description.
- id String
- last
Updated StringAt - Most recent policy update timestamp.
- last
Updated StringBy - Most recent policy editor.
- name String
- 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.
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the
vra
Terraform Provider.