Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Identity.getTenancy
Explore with Pulumi AI
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:
- Tenancy
Id string - The OCID of the tenancy.
- Tenancy
Id string - The OCID of the tenancy.
- tenancy
Id String - The OCID of the tenancy.
- tenancy
Id string - The OCID of the tenancy.
- tenancy_
id str - The OCID of the tenancy.
- tenancy
Id String - The OCID of the tenancy.
getTenancy Result
The following output properties are available:
- 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.
- 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"}
- Home
Region stringKey - 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.
- Tenancy
Id string - Upi
Idcs stringCompatibility Layer Endpoint - Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
- 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.
- 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"}
- Home
Region stringKey - 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.
- Tenancy
Id string - Upi
Idcs stringCompatibility Layer Endpoint - Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
- 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.
- 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"}
- home
Region StringKey - 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.
- tenancy
Id String - upi
Idcs StringCompatibility Layer Endpoint - Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
- {[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.
- {[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"}
- home
Region stringKey - 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.
- tenancy
Id string - upi
Idcs stringCompatibility Layer Endpoint - Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
- 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.
- 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_ strkey - 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_ strcompatibility_ layer_ endpoint - Url which refers to the UPI IDCS compatibility layer endpoint configured for this Tenant's home region.
- 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.
- 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"}
- home
Region StringKey - 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.
- tenancy
Id String - upi
Idcs StringCompatibility Layer Endpoint - 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.