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

oci.CloudBridge.getEnvironment

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 Environment resource in Oracle Cloud Infrastructure Cloud Bridge service.

    Gets a source environment by identifier.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testEnvironment = oci.CloudBridge.getEnvironment({
        environmentId: testEnvironmentOciCloudBridgeEnvironment.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_environment = oci.CloudBridge.get_environment(environment_id=test_environment_oci_cloud_bridge_environment["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/CloudBridge"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := CloudBridge.GetEnvironment(ctx, &cloudbridge.GetEnvironmentArgs{
    			EnvironmentId: testEnvironmentOciCloudBridgeEnvironment.Id,
    		}, 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 testEnvironment = Oci.CloudBridge.GetEnvironment.Invoke(new()
        {
            EnvironmentId = testEnvironmentOciCloudBridgeEnvironment.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.CloudBridge.CloudBridgeFunctions;
    import com.pulumi.oci.CloudBridge.inputs.GetEnvironmentArgs;
    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 testEnvironment = CloudBridgeFunctions.getEnvironment(GetEnvironmentArgs.builder()
                .environmentId(testEnvironmentOciCloudBridgeEnvironment.id())
                .build());
    
        }
    }
    
    variables:
      testEnvironment:
        fn::invoke:
          Function: oci:CloudBridge:getEnvironment
          Arguments:
            environmentId: ${testEnvironmentOciCloudBridgeEnvironment.id}
    

    Using getEnvironment

    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 getEnvironment(args: GetEnvironmentArgs, opts?: InvokeOptions): Promise<GetEnvironmentResult>
    function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentResult>
    def get_environment(environment_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetEnvironmentResult
    def get_environment_output(environment_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentResult]
    func GetEnvironment(ctx *Context, args *GetEnvironmentArgs, opts ...InvokeOption) (*GetEnvironmentResult, error)
    func GetEnvironmentOutput(ctx *Context, args *GetEnvironmentOutputArgs, opts ...InvokeOption) GetEnvironmentResultOutput

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

    public static class GetEnvironment 
    {
        public static Task<GetEnvironmentResult> InvokeAsync(GetEnvironmentArgs args, InvokeOptions? opts = null)
        public static Output<GetEnvironmentResult> Invoke(GetEnvironmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:CloudBridge/getEnvironment:getEnvironment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnvironmentId string
    Unique environment identifier.
    EnvironmentId string
    Unique environment identifier.
    environmentId String
    Unique environment identifier.
    environmentId string
    Unique environment identifier.
    environment_id str
    Unique environment identifier.
    environmentId String
    Unique environment identifier.

    getEnvironment Result

    The following output properties are available:

    CompartmentId string
    Compartment identifier.
    DefinedTags Dictionary<string, string>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    Environment identifier, which can be renamed.
    EnvironmentId string
    FreeformTags Dictionary<string, string>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    Unique identifier that is immutable on creation.
    LifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    State string
    The current state of the source environment.
    SystemTags Dictionary<string, string>
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    TimeCreated string
    The time when the source environment was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time when the source environment was updated. An RFC3339 formatted datetime string.
    CompartmentId string
    Compartment identifier.
    DefinedTags map[string]string
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    Environment identifier, which can be renamed.
    EnvironmentId string
    FreeformTags map[string]string
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    Unique identifier that is immutable on creation.
    LifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    State string
    The current state of the source environment.
    SystemTags map[string]string
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    TimeCreated string
    The time when the source environment was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time when the source environment was updated. An RFC3339 formatted datetime string.
    compartmentId String
    Compartment identifier.
    definedTags Map<String,String>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    Environment identifier, which can be renamed.
    environmentId String
    freeformTags Map<String,String>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    Unique identifier that is immutable on creation.
    lifecycleDetails String
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    state String
    The current state of the source environment.
    systemTags Map<String,String>
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated String
    The time when the source environment was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The time when the source environment was updated. An RFC3339 formatted datetime string.
    compartmentId string
    Compartment identifier.
    definedTags {[key: string]: string}
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    Environment identifier, which can be renamed.
    environmentId string
    freeformTags {[key: string]: string}
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    Unique identifier that is immutable on creation.
    lifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    state string
    The current state of the source environment.
    systemTags {[key: string]: string}
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated string
    The time when the source environment was created. An RFC3339 formatted datetime string.
    timeUpdated string
    The time when the source environment was updated. An RFC3339 formatted datetime string.
    compartment_id str
    Compartment identifier.
    defined_tags Mapping[str, str]
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    Environment identifier, which can be renamed.
    environment_id str
    freeform_tags Mapping[str, str]
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    Unique identifier that is immutable on creation.
    lifecycle_details str
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    state str
    The current state of the source environment.
    system_tags Mapping[str, str]
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    time_created str
    The time when the source environment was created. An RFC3339 formatted datetime string.
    time_updated str
    The time when the source environment was updated. An RFC3339 formatted datetime string.
    compartmentId String
    Compartment identifier.
    definedTags Map<String>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    Environment identifier, which can be renamed.
    environmentId String
    freeformTags Map<String>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace/scope. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    Unique identifier that is immutable on creation.
    lifecycleDetails String
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in Failed state.
    state String
    The current state of the source environment.
    systemTags Map<String>
    The system tags associated with this resource, if any. The system tags are set by Oracle cloud infrastructure services. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {orcl-cloud: {free-tier-retain: true}}
    timeCreated String
    The time when the source environment was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The time when the source environment was updated. An RFC3339 formatted datetime string.

    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