1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. getTenancy
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Identity.getTenancy

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides details about a specific Tenancy resource in Oracle Cloud Infrastructure Identity service.

    Get the specified tenancy’s information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testTenancy = oci.Identity.getTenancy({
        tenancyId: tenancyOcid,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_tenancy = oci.Identity.get_tenancy(tenancy_id=tenancy_ocid)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Identity.GetTenancy(ctx, &identity.GetTenancyArgs{
    			TenancyId: tenancyOcid,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testTenancy = Oci.Identity.GetTenancy.Invoke(new()
        {
            TenancyId = tenancyOcid,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Identity.IdentityFunctions;
    import com.pulumi.oci.Identity.inputs.GetTenancyArgs;
    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 testTenancy = IdentityFunctions.getTenancy(GetTenancyArgs.builder()
                .tenancyId(tenancyOcid)
                .build());
    
        }
    }
    
    variables:
      testTenancy:
        fn::invoke:
          Function: oci:Identity:getTenancy
          Arguments:
            tenancyId: ${tenancyOcid}
    

    Using getTenancy

    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 getTenancy(args: GetTenancyArgs, opts?: InvokeOptions): Promise<GetTenancyResult>
    function getTenancyOutput(args: GetTenancyOutputArgs, opts?: InvokeOptions): Output<GetTenancyResult>
    def get_tenancy(tenancy_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetTenancyResult
    def get_tenancy_output(tenancy_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetTenancyResult]
    func GetTenancy(ctx *Context, args *GetTenancyArgs, opts ...InvokeOption) (*GetTenancyResult, error)
    func GetTenancyOutput(ctx *Context, args *GetTenancyOutputArgs, opts ...InvokeOption) GetTenancyResultOutput

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

    public static class GetTenancy 
    {
        public static Task<GetTenancyResult> InvokeAsync(GetTenancyArgs args, InvokeOptions? opts = null)
        public static Output<GetTenancyResult> Invoke(GetTenancyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTenancyResult> getTenancy(GetTenancyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Identity/getTenancy:getTenancy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TenancyId string
    The OCID of the tenancy.
    TenancyId string
    The OCID of the tenancy.
    tenancyId String
    The OCID of the tenancy.
    tenancyId string
    The OCID of the tenancy.
    tenancy_id str
    The OCID of the tenancy.
    tenancyId String
    The OCID of the tenancy.

    getTenancy Result

    The following output properties are available:

    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    The description of the tenancy.
    FreeformTags Dictionary<string, string>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    HomeRegionKey string
    The region key for the tenancy's home region. For the full list of supported regions, see Regions and Availability Domains. Example: PHX
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the tenancy.
    TenancyId string
    UpiIdcsCompatibilityLayerEndpoint string
    Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    The description of the tenancy.
    FreeformTags map[string]string
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    HomeRegionKey string
    The region key for the tenancy's home region. For the full list of supported regions, see Regions and Availability Domains. Example: PHX
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the tenancy.
    TenancyId string
    UpiIdcsCompatibilityLayerEndpoint string
    Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    The description of the tenancy.
    freeformTags Map<String,String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    homeRegionKey String
    The region key for the tenancy's home region. For the full list of supported regions, see Regions and Availability Domains. Example: PHX
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the tenancy.
    tenancyId String
    upiIdcsCompatibilityLayerEndpoint String
    Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    The description of the tenancy.
    freeformTags {[key: string]: string}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    homeRegionKey string
    The region key for the tenancy's home region. For the full list of supported regions, see Regions and Availability Domains. Example: PHX
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The name of the tenancy.
    tenancyId string
    upiIdcsCompatibilityLayerEndpoint string
    Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    The description of the tenancy.
    freeform_tags Mapping[str, str]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    home_region_key str
    The region key for the tenancy's home region. For the full list of supported regions, see Regions and Availability Domains. Example: PHX
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The name of the tenancy.
    tenancy_id str
    upi_idcs_compatibility_layer_endpoint str
    Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    The description of the tenancy.
    freeformTags Map<String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    homeRegionKey String
    The region key for the tenancy's home region. For the full list of supported regions, see Regions and Availability Domains. Example: PHX
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The name of the tenancy.
    tenancyId String
    upiIdcsCompatibilityLayerEndpoint String
    Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi