Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.CloudBridge.getEnvironments
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides the list of Environments in Oracle Cloud Infrastructure Cloud Bridge service.
Returns a list of source environments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testEnvironments = oci.CloudBridge.getEnvironments({
compartmentId: compartmentId,
displayName: environmentDisplayName,
environmentId: testEnvironment.id,
state: environmentState,
});
import pulumi
import pulumi_oci as oci
test_environments = oci.CloudBridge.get_environments(compartment_id=compartment_id,
display_name=environment_display_name,
environment_id=test_environment["id"],
state=environment_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/CloudBridge"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := CloudBridge.GetEnvironments(ctx, &cloudbridge.GetEnvironmentsArgs{
CompartmentId: compartmentId,
DisplayName: pulumi.StringRef(environmentDisplayName),
EnvironmentId: pulumi.StringRef(testEnvironment.Id),
State: pulumi.StringRef(environmentState),
}, 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 testEnvironments = Oci.CloudBridge.GetEnvironments.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = environmentDisplayName,
EnvironmentId = testEnvironment.Id,
State = environmentState,
});
});
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.GetEnvironmentsArgs;
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 testEnvironments = CloudBridgeFunctions.getEnvironments(GetEnvironmentsArgs.builder()
.compartmentId(compartmentId)
.displayName(environmentDisplayName)
.environmentId(testEnvironment.id())
.state(environmentState)
.build());
}
}
variables:
testEnvironments:
fn::invoke:
Function: oci:CloudBridge:getEnvironments
Arguments:
compartmentId: ${compartmentId}
displayName: ${environmentDisplayName}
environmentId: ${testEnvironment.id}
state: ${environmentState}
Using getEnvironments
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 getEnvironments(args: GetEnvironmentsArgs, opts?: InvokeOptions): Promise<GetEnvironmentsResult>
function getEnvironmentsOutput(args: GetEnvironmentsOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentsResult>
def get_environments(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
environment_id: Optional[str] = None,
filters: Optional[Sequence[_cloudbridge.GetEnvironmentsFilter]] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEnvironmentsResult
def get_environments_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
environment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_cloudbridge.GetEnvironmentsFilterArgs]]]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentsResult]
func GetEnvironments(ctx *Context, args *GetEnvironmentsArgs, opts ...InvokeOption) (*GetEnvironmentsResult, error)
func GetEnvironmentsOutput(ctx *Context, args *GetEnvironmentsOutputArgs, opts ...InvokeOption) GetEnvironmentsResultOutput
> Note: This function is named GetEnvironments
in the Go SDK.
public static class GetEnvironments
{
public static Task<GetEnvironmentsResult> InvokeAsync(GetEnvironmentsArgs args, InvokeOptions? opts = null)
public static Output<GetEnvironmentsResult> Invoke(GetEnvironmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEnvironmentsResult> getEnvironments(GetEnvironmentsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:CloudBridge/getEnvironments:getEnvironments
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The ID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the entire display name given.
- Environment
Id string - A filter to return only resources that match the given environment ID.
- Filters
List<Get
Environments Filter> - State string
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- Compartment
Id string - The ID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the entire display name given.
- Environment
Id string - A filter to return only resources that match the given environment ID.
- Filters
[]Get
Environments Filter - State string
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- compartment
Id String - The ID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the entire display name given.
- environment
Id String - A filter to return only resources that match the given environment ID.
- filters
List<Get
Environments Filter> - state String
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- compartment
Id string - The ID of the compartment in which to list resources.
- display
Name string - A filter to return only resources that match the entire display name given.
- environment
Id string - A filter to return only resources that match the given environment ID.
- filters
Get
Environments Filter[] - state string
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- compartment_
id str - The ID of the compartment in which to list resources.
- display_
name str - A filter to return only resources that match the entire display name given.
- environment_
id str - A filter to return only resources that match the given environment ID.
- filters
Sequence[cloudbridge.
Get Environments Filter] - state str
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- compartment
Id String - The ID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the entire display name given.
- environment
Id String - A filter to return only resources that match the given environment ID.
- filters List<Property Map>
- state String
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
getEnvironments Result
The following output properties are available:
- Compartment
Id string - Compartment identifier.
- Environment
Collections List<GetEnvironments Environment Collection> - The list of environment_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Display
Name string - Environment identifier, which can be renamed.
- Environment
Id string - Filters
List<Get
Environments Filter> - State string
- The current state of the source environment.
- Compartment
Id string - Compartment identifier.
- Environment
Collections []GetEnvironments Environment Collection - The list of environment_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- Display
Name string - Environment identifier, which can be renamed.
- Environment
Id string - Filters
[]Get
Environments Filter - State string
- The current state of the source environment.
- compartment
Id String - Compartment identifier.
- environment
Collections List<GetEnvironments Environment Collection> - The list of environment_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- display
Name String - Environment identifier, which can be renamed.
- environment
Id String - filters
List<Get
Environments Filter> - state String
- The current state of the source environment.
- compartment
Id string - Compartment identifier.
- environment
Collections GetEnvironments Environment Collection[] - The list of environment_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- display
Name string - Environment identifier, which can be renamed.
- environment
Id string - filters
Get
Environments Filter[] - state string
- The current state of the source environment.
- compartment_
id str - Compartment identifier.
- environment_
collections Sequence[cloudbridge.Get Environments Environment Collection] - The list of environment_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- display_
name str - Environment identifier, which can be renamed.
- environment_
id str - filters
Sequence[cloudbridge.
Get Environments Filter] - state str
- The current state of the source environment.
- compartment
Id String - Compartment identifier.
- environment
Collections List<Property Map> - The list of environment_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- display
Name String - Environment identifier, which can be renamed.
- environment
Id String - filters List<Property Map>
- state String
- The current state of the source environment.
Supporting Types
GetEnvironmentsEnvironmentCollection
GetEnvironmentsEnvironmentCollectionItem
- Compartment
Id string - The ID of the compartment in which to list resources.
- Dictionary<string, object>
- 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 string - A filter to return only resources that match the entire display name given.
- Dictionary<string, object>
- 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.
- Lifecycle
Details 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
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- Dictionary<string, object>
- 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 string - The time when the source environment was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time when the source environment was updated. An RFC3339 formatted datetime string.
- Compartment
Id string - The ID of the compartment in which to list resources.
- map[string]interface{}
- 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 string - A filter to return only resources that match the entire display name given.
- map[string]interface{}
- 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.
- Lifecycle
Details 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
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- map[string]interface{}
- 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 string - The time when the source environment was created. An RFC3339 formatted datetime string.
- Time
Updated string - The time when the source environment was updated. An RFC3339 formatted datetime string.
- compartment
Id String - The ID of the compartment in which to list resources.
- Map<String,Object>
- 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 String - A filter to return only resources that match the entire display name given.
- Map<String,Object>
- 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.
- lifecycle
Details 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
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- Map<String,Object>
- 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 String - The time when the source environment was created. An RFC3339 formatted datetime string.
- time
Updated String - The time when the source environment was updated. An RFC3339 formatted datetime string.
- compartment
Id string - The ID of the compartment in which to list resources.
- {[key: string]: any}
- 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 string - A filter to return only resources that match the entire display name given.
- {[key: string]: any}
- 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.
- lifecycle
Details 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
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- {[key: string]: any}
- 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 string - The time when the source environment was created. An RFC3339 formatted datetime string.
- time
Updated string - The time when the source environment was updated. An RFC3339 formatted datetime string.
- compartment_
id str - The ID of the compartment in which to list resources.
- Mapping[str, Any]
- 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 - A filter to return only resources that match the entire display name given.
- Mapping[str, Any]
- 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
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- Mapping[str, Any]
- 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.
- compartment
Id String - The ID of the compartment in which to list resources.
- Map<Any>
- 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 String - A filter to return only resources that match the entire display name given.
- Map<Any>
- 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.
- lifecycle
Details 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
- A filter to return only resources where their lifecycleState matches the given lifecycleState.
- Map<Any>
- 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 String - The time when the source environment was created. An RFC3339 formatted datetime string.
- time
Updated String - The time when the source environment was updated. An RFC3339 formatted datetime string.
GetEnvironmentsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi