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);
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)
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
})
}
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),
};
});
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()));
}
}
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}
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>
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]
func LookupCatalogAccessControl(ctx *Context, args *LookupCatalogAccessControlArgs, opts ...InvokeOption) (*LookupCatalogAccessControlResult, error)
func LookupCatalogAccessControlOutput(ctx *Context, args *LookupCatalogAccessControlOutputArgs, opts ...InvokeOption) LookupCatalogAccessControlResultOutput
> 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)
}
public static CompletableFuture<GetCatalogAccessControlResult> getCatalogAccessControl(GetCatalogAccessControlArgs args, InvokeOptions options)
public static Output<GetCatalogAccessControlResult> getCatalogAccessControl(GetCatalogAccessControlArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getCatalogAccessControl:getCatalogAccessControl
arguments:
# arguments dictionary
The following arguments are supported:
- catalog_
id 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.
getCatalogAccessControl Result
The following output properties are available:
- Catalog
Id string - Everyone
Access stringLevel - Id string
- bool
- bool
- List<Get
Catalog Access Control Shared With> - Org string
- Catalog
Id string - Everyone
Access stringLevel - Id string
- bool
- bool
- []Get
Catalog Access Control Shared With - Org string
- catalog
Id String - everyone
Access StringLevel - id String
- Boolean
- Boolean
- List<Get
Catalog Access Control Shared With> - org String
- catalog
Id string - everyone
Access stringLevel - id string
- boolean
- boolean
- Get
Catalog Access Control Shared With[] - org string
- catalog_
id str - everyone_
access_ strlevel - id str
- bool
- bool
- Sequence[Get
Catalog Access Control Shared With] - org str
- catalog
Id String - everyone
Access StringLevel - id String
- Boolean
- Boolean
- List<Property Map>
- org String
Supporting Types
GetCatalogAccessControlSharedWith
- Access
Level string - Group
Id string - Org
Id string - Subject
Name string - User
Id string
- Access
Level string - Group
Id string - Org
Id string - Subject
Name string - User
Id string
- access
Level String - group
Id String - org
Id String - subject
Name String - user
Id String
- access
Level string - group
Id string - org
Id string - subject
Name string - user
Id string
- access_
level str - group_
id str - org_
id str - subject_
name str - user_
id str
- access
Level String - group
Id String - org
Id String - subject
Name String - user
Id String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.