1. Packages
  2. Vcd Provider
  3. API Docs
  4. getCatalogAccessControl
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getCatalogAccessControl

Explore with Pulumi AI

Provides a data source to read Access Control details from a Catalog in VMware Cloud Director.

Note: Access control reads run in tenant context, meaning that, even if the user is a system administrator, in every request it uses headers items that define the tenant context as restricted to the organization to which the Catalog belongs.

Supported in provider v3.14+

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";

const catalog = vcd.getCatalog({
    name: "my-catalog",
});
const ac = catalog.then(catalog => vcd.getCatalogAccessControl({
    catalogId: catalog.id,
}));
export const sharedWith = ac.then(ac => ac.sharedWiths);
Copy
import pulumi
import pulumi_vcd as vcd

catalog = vcd.get_catalog(name="my-catalog")
ac = vcd.get_catalog_access_control(catalog_id=catalog.id)
pulumi.export("sharedWith", ac.shared_withs)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		catalog, err := vcd.LookupCatalog(ctx, &vcd.LookupCatalogArgs{
			Name: pulumi.StringRef("my-catalog"),
		}, nil)
		if err != nil {
			return err
		}
		ac, err := vcd.LookupCatalogAccessControl(ctx, &vcd.LookupCatalogAccessControlArgs{
			CatalogId: catalog.Id,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("sharedWith", ac.SharedWiths)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;

return await Deployment.RunAsync(() => 
{
    var catalog = Vcd.GetCatalog.Invoke(new()
    {
        Name = "my-catalog",
    });

    var ac = Vcd.GetCatalogAccessControl.Invoke(new()
    {
        CatalogId = catalog.Apply(getCatalogResult => getCatalogResult.Id),
    });

    return new Dictionary<string, object?>
    {
        ["sharedWith"] = ac.Apply(getCatalogAccessControlResult => getCatalogAccessControlResult.SharedWiths),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetCatalogArgs;
import com.pulumi.vcd.inputs.GetCatalogAccessControlArgs;
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 catalog = VcdFunctions.getCatalog(GetCatalogArgs.builder()
            .name("my-catalog")
            .build());

        final var ac = VcdFunctions.getCatalogAccessControl(GetCatalogAccessControlArgs.builder()
            .catalogId(catalog.applyValue(getCatalogResult -> getCatalogResult.id()))
            .build());

        ctx.export("sharedWith", ac.applyValue(getCatalogAccessControlResult -> getCatalogAccessControlResult.sharedWiths()));
    }
}
Copy
variables:
  catalog:
    fn::invoke:
      function: vcd:getCatalog
      arguments:
        name: my-catalog
  ac:
    fn::invoke:
      function: vcd:getCatalogAccessControl
      arguments:
        catalogId: ${catalog.id}
outputs:
  sharedWith: ${ac.sharedWiths}
Copy

Using getCatalogAccessControl

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 getCatalogAccessControl(args: GetCatalogAccessControlArgs, opts?: InvokeOptions): Promise<GetCatalogAccessControlResult>
function getCatalogAccessControlOutput(args: GetCatalogAccessControlOutputArgs, opts?: InvokeOptions): Output<GetCatalogAccessControlResult>
Copy
def get_catalog_access_control(catalog_id: Optional[str] = None,
                               id: Optional[str] = None,
                               org: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetCatalogAccessControlResult
def get_catalog_access_control_output(catalog_id: Optional[pulumi.Input[str]] = None,
                               id: Optional[pulumi.Input[str]] = None,
                               org: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetCatalogAccessControlResult]
Copy
func LookupCatalogAccessControl(ctx *Context, args *LookupCatalogAccessControlArgs, opts ...InvokeOption) (*LookupCatalogAccessControlResult, error)
func LookupCatalogAccessControlOutput(ctx *Context, args *LookupCatalogAccessControlOutputArgs, opts ...InvokeOption) LookupCatalogAccessControlResultOutput
Copy

> Note: This function is named LookupCatalogAccessControl in the Go SDK.

public static class GetCatalogAccessControl 
{
    public static Task<GetCatalogAccessControlResult> InvokeAsync(GetCatalogAccessControlArgs args, InvokeOptions? opts = null)
    public static Output<GetCatalogAccessControlResult> Invoke(GetCatalogAccessControlInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCatalogAccessControlResult> getCatalogAccessControl(GetCatalogAccessControlArgs args, InvokeOptions options)
public static Output<GetCatalogAccessControlResult> getCatalogAccessControl(GetCatalogAccessControlArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: vcd:index/getCatalogAccessControl:getCatalogAccessControl
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CatalogId This property is required. string
A unique identifier for the Catalog.
Id string
Org string
The name of organization to which the Catalog belongs. Optional if defined at provider level.
CatalogId This property is required. string
A unique identifier for the Catalog.
Id string
Org string
The name of organization to which the Catalog belongs. Optional if defined at provider level.
catalogId This property is required. String
A unique identifier for the Catalog.
id String
org String
The name of organization to which the Catalog belongs. Optional if defined at provider level.
catalogId This property is required. string
A unique identifier for the Catalog.
id string
org string
The name of organization to which the Catalog belongs. Optional if defined at provider level.
catalog_id This property is required. str
A unique identifier for the Catalog.
id str
org str
The name of organization to which the Catalog belongs. Optional if defined at provider level.
catalogId This property is required. String
A unique identifier for the Catalog.
id String
org String
The name of organization to which the Catalog belongs. Optional if defined at provider level.

getCatalogAccessControl Result

The following output properties are available:

Supporting Types

GetCatalogAccessControlSharedWith

AccessLevel This property is required. string
GroupId This property is required. string
OrgId This property is required. string
SubjectName This property is required. string
UserId This property is required. string
AccessLevel This property is required. string
GroupId This property is required. string
OrgId This property is required. string
SubjectName This property is required. string
UserId This property is required. string
accessLevel This property is required. String
groupId This property is required. String
orgId This property is required. String
subjectName This property is required. String
userId This property is required. String
accessLevel This property is required. string
groupId This property is required. string
orgId This property is required. string
subjectName This property is required. string
userId This property is required. string
access_level This property is required. str
group_id This property is required. str
org_id This property is required. str
subject_name This property is required. str
user_id This property is required. str
accessLevel This property is required. String
groupId This property is required. String
orgId This property is required. String
subjectName This property is required. String
userId This property is required. String

Package Details

Repository
vcd vmware/terraform-provider-vcd
License
Notes
This Pulumi package is based on the vcd Terraform Provider.