This data source provides the list of Batch Task Environments in Oracle Cloud Infrastructure Batch service.
Lists the task environments by compartment or environment OCID. You can filter and sort them by various properties like lifecycle state, display name and also ocid. All properties require an exact match. List operation only provides a summary information, use GetBatchTaskEnvironment to get the full details on a specific context
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testBatchTaskEnvironments = oci.oci.getBatchBatchTaskEnvironments({
compartmentId: compartmentId,
displayName: batchTaskEnvironmentDisplayName,
id: batchTaskEnvironmentId,
state: batchTaskEnvironmentState,
});
import pulumi
import pulumi_oci as oci
test_batch_task_environments = oci.oci.get_batch_batch_task_environments(compartment_id=compartment_id,
display_name=batch_task_environment_display_name,
id=batch_task_environment_id,
state=batch_task_environment_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/oci"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := oci.GetBatchBatchTaskEnvironments(ctx, &oci.GetBatchBatchTaskEnvironmentsArgs{
CompartmentId: pulumi.StringRef(compartmentId),
DisplayName: pulumi.StringRef(batchTaskEnvironmentDisplayName),
Id: pulumi.StringRef(batchTaskEnvironmentId),
State: pulumi.StringRef(batchTaskEnvironmentState),
}, 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 testBatchTaskEnvironments = Oci.Oci.GetBatchBatchTaskEnvironments.Invoke(new()
{
CompartmentId = compartmentId,
DisplayName = batchTaskEnvironmentDisplayName,
Id = batchTaskEnvironmentId,
State = batchTaskEnvironmentState,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.oci.OciFunctions;
import com.pulumi.oci.oci.inputs.GetBatchBatchTaskEnvironmentsArgs;
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 testBatchTaskEnvironments = OciFunctions.getBatchBatchTaskEnvironments(GetBatchBatchTaskEnvironmentsArgs.builder()
.compartmentId(compartmentId)
.displayName(batchTaskEnvironmentDisplayName)
.id(batchTaskEnvironmentId)
.state(batchTaskEnvironmentState)
.build());
}
}
variables:
testBatchTaskEnvironments:
fn::invoke:
function: oci:oci:getBatchBatchTaskEnvironments
arguments:
compartmentId: ${compartmentId}
displayName: ${batchTaskEnvironmentDisplayName}
id: ${batchTaskEnvironmentId}
state: ${batchTaskEnvironmentState}
Using getBatchBatchTaskEnvironments
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 getBatchBatchTaskEnvironments(args: GetBatchBatchTaskEnvironmentsArgs, opts?: InvokeOptions): Promise<GetBatchBatchTaskEnvironmentsResult>
function getBatchBatchTaskEnvironmentsOutput(args: GetBatchBatchTaskEnvironmentsOutputArgs, opts?: InvokeOptions): Output<GetBatchBatchTaskEnvironmentsResult>def get_batch_batch_task_environments(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[GetBatchBatchTaskEnvironmentsFilter]] = None,
id: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetBatchBatchTaskEnvironmentsResult
def get_batch_batch_task_environments_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetBatchBatchTaskEnvironmentsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetBatchBatchTaskEnvironmentsResult]func GetBatchBatchTaskEnvironments(ctx *Context, args *GetBatchBatchTaskEnvironmentsArgs, opts ...InvokeOption) (*GetBatchBatchTaskEnvironmentsResult, error)
func GetBatchBatchTaskEnvironmentsOutput(ctx *Context, args *GetBatchBatchTaskEnvironmentsOutputArgs, opts ...InvokeOption) GetBatchBatchTaskEnvironmentsResultOutput> Note: This function is named GetBatchBatchTaskEnvironments in the Go SDK.
public static class GetBatchBatchTaskEnvironments
{
public static Task<GetBatchBatchTaskEnvironmentsResult> InvokeAsync(GetBatchBatchTaskEnvironmentsArgs args, InvokeOptions? opts = null)
public static Output<GetBatchBatchTaskEnvironmentsResult> Invoke(GetBatchBatchTaskEnvironmentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetBatchBatchTaskEnvironmentsResult> getBatchBatchTaskEnvironments(GetBatchBatchTaskEnvironmentsArgs args, InvokeOptions options)
public static Output<GetBatchBatchTaskEnvironmentsResult> getBatchBatchTaskEnvironments(GetBatchBatchTaskEnvironmentsArgs args, InvokeOptions options)
fn::invoke:
function: oci:oci/getBatchBatchTaskEnvironments:getBatchBatchTaskEnvironments
arguments:
# arguments dictionaryThe following arguments are supported:
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
List<Get
Batch Batch Task Environments Filter> - Id string
- The OCID of the batch task environment.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Compartment
Id string - The OCID of the compartment in which to list resources.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- Filters
[]Get
Batch Batch Task Environments Filter - Id string
- The OCID of the batch task environment.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id String - The OCID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters
List<Get
Batch Batch Task Environments Filter> - id String
- The OCID of the batch task environment.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id string - The OCID of the compartment in which to list resources.
- display
Name string - A filter to return only resources that match the given display name exactly.
- filters
Get
Batch Batch Task Environments Filter[] - id string
- The OCID of the batch task environment.
- state string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartment_
id str - The OCID of the compartment in which to list resources.
- display_
name str - A filter to return only resources that match the given display name exactly.
- filters
Sequence[Get
Batch Batch Task Environments Filter] - id str
- The OCID of the batch task environment.
- state str
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id String - The OCID of the compartment in which to list resources.
- display
Name String - A filter to return only resources that match the given display name exactly.
- filters List<Property Map>
- id String
- The OCID of the batch task environment.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
getBatchBatchTaskEnvironments Result
The following output properties are available:
- Batch
Task List<GetEnvironment Collections Batch Batch Task Environments Batch Task Environment Collection> - The list of batch_task_environment_collection.
- Compartment
Id string - The OCID of the compartment.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. If not specified or provided as null or empty string, it be generated as "", where timeCreated corresponds with the resource creation time in ISO 8601 basic format, i.e. omitting separating punctuation, at second-level precision and no UTC offset. Example: batchtaskenvironment20250914115623.
- Filters
List<Get
Batch Batch Task Environments Filter> - Id string
- The OCID of the batch task environment.
- State string
- The current state of the batch task environment.
- Batch
Task []GetEnvironment Collections Batch Batch Task Environments Batch Task Environment Collection - The list of batch_task_environment_collection.
- Compartment
Id string - The OCID of the compartment.
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. If not specified or provided as null or empty string, it be generated as "", where timeCreated corresponds with the resource creation time in ISO 8601 basic format, i.e. omitting separating punctuation, at second-level precision and no UTC offset. Example: batchtaskenvironment20250914115623.
- Filters
[]Get
Batch Batch Task Environments Filter - Id string
- The OCID of the batch task environment.
- State string
- The current state of the batch task environment.
- batch
Task List<GetEnvironment Collections Batch Batch Task Environments Batch Task Environment Collection> - The list of batch_task_environment_collection.
- compartment
Id String - The OCID of the compartment.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. If not specified or provided as null or empty string, it be generated as "", where timeCreated corresponds with the resource creation time in ISO 8601 basic format, i.e. omitting separating punctuation, at second-level precision and no UTC offset. Example: batchtaskenvironment20250914115623.
- filters
List<Get
Batch Batch Task Environments Filter> - id String
- The OCID of the batch task environment.
- state String
- The current state of the batch task environment.
- batch
Task GetEnvironment Collections Batch Batch Task Environments Batch Task Environment Collection[] - The list of batch_task_environment_collection.
- compartment
Id string - The OCID of the compartment.
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. If not specified or provided as null or empty string, it be generated as "", where timeCreated corresponds with the resource creation time in ISO 8601 basic format, i.e. omitting separating punctuation, at second-level precision and no UTC offset. Example: batchtaskenvironment20250914115623.
- filters
Get
Batch Batch Task Environments Filter[] - id string
- The OCID of the batch task environment.
- state string
- The current state of the batch task environment.
- batch_
task_ Sequence[Getenvironment_ collections Batch Batch Task Environments Batch Task Environment Collection] - The list of batch_task_environment_collection.
- compartment_
id str - The OCID of the compartment.
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. If not specified or provided as null or empty string, it be generated as "", where timeCreated corresponds with the resource creation time in ISO 8601 basic format, i.e. omitting separating punctuation, at second-level precision and no UTC offset. Example: batchtaskenvironment20250914115623.
- filters
Sequence[Get
Batch Batch Task Environments Filter] - id str
- The OCID of the batch task environment.
- state str
- The current state of the batch task environment.
- batch
Task List<Property Map>Environment Collections - The list of batch_task_environment_collection.
- compartment
Id String - The OCID of the compartment.
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. If not specified or provided as null or empty string, it be generated as "", where timeCreated corresponds with the resource creation time in ISO 8601 basic format, i.e. omitting separating punctuation, at second-level precision and no UTC offset. Example: batchtaskenvironment20250914115623.
- filters List<Property Map>
- id String
- The OCID of the batch task environment.
- state String
- The current state of the batch task environment.
Supporting Types
GetBatchBatchTaskEnvironmentsBatchTaskEnvironmentCollection
GetBatchBatchTaskEnvironmentsBatchTaskEnvironmentCollectionItem
- Compartment
Id string - The OCID of the compartment in which to list resources.
- 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 batch task environment description.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- 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"} - Id string
- The OCID of the batch task environment.
- Image
Url string - The URL of the ocir image.
- Security
Contexts List<GetBatch Batch Task Environments Batch Task Environment Collection Item Security Context> - Security context for container runtime configuration.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The date and time the batch task environment was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the batch task environment was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - Volumes
List<Get
Batch Batch Task Environments Batch Task Environment Collection Item Volume> - List of volumes attached to the image. The use cases of the volumes are but not limited to: read the input of the task and write the output.
- Working
Directory string - Container's working directory.
- Compartment
Id string - The OCID of the compartment in which to list resources.
- 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 batch task environment description.
- Display
Name string - A filter to return only resources that match the given display name exactly.
- 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"} - Id string
- The OCID of the batch task environment.
- Image
Url string - The URL of the ocir image.
- Security
Contexts []GetBatch Batch Task Environments Batch Task Environment Collection Item Security Context - Security context for container runtime configuration.
- State string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - Time
Created string - The date and time the batch task environment was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - Time
Updated string - The date and time the batch task environment was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - Volumes
[]Get
Batch Batch Task Environments Batch Task Environment Collection Item Volume - List of volumes attached to the image. The use cases of the volumes are but not limited to: read the input of the task and write the output.
- Working
Directory string - Container's working directory.
- compartment
Id String - The OCID of the compartment in which to list resources.
- 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 batch task environment description.
- display
Name String - A filter to return only resources that match the given display name exactly.
- 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"} - id String
- The OCID of the batch task environment.
- image
Url String - The URL of the ocir image.
- security
Contexts List<GetBatch Batch Task Environments Batch Task Environment Collection Item Security Context> - Security context for container runtime configuration.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The date and time the batch task environment was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the batch task environment was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - volumes
List<Get
Batch Batch Task Environments Batch Task Environment Collection Item Volume> - List of volumes attached to the image. The use cases of the volumes are but not limited to: read the input of the task and write the output.
- working
Directory String - Container's working directory.
- compartment
Id string - The OCID of the compartment in which to list resources.
- {[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 batch task environment description.
- display
Name string - A filter to return only resources that match the given display name exactly.
- {[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"} - id string
- The OCID of the batch task environment.
- image
Url string - The URL of the ocir image.
- security
Contexts GetBatch Batch Task Environments Batch Task Environment Collection Item Security Context[] - Security context for container runtime configuration.
- state string
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created string - The date and time the batch task environment was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated string - The date and time the batch task environment was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - volumes
Get
Batch Batch Task Environments Batch Task Environment Collection Item Volume[] - List of volumes attached to the image. The use cases of the volumes are but not limited to: read the input of the task and write the output.
- working
Directory string - Container's working directory.
- compartment_
id str - The OCID of the compartment in which to list resources.
- 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 batch task environment description.
- display_
name str - A filter to return only resources that match the given display name exactly.
- 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"} - id str
- The OCID of the batch task environment.
- image_
url str - The URL of the ocir image.
- security_
contexts Sequence[GetBatch Batch Task Environments Batch Task Environment Collection Item Security Context] - Security context for container runtime configuration.
- state str
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - time_
created str - The date and time the batch task environment was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time_
updated str - The date and time the batch task environment was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - volumes
Sequence[Get
Batch Batch Task Environments Batch Task Environment Collection Item Volume] - List of volumes attached to the image. The use cases of the volumes are but not limited to: read the input of the task and write the output.
- working_
directory str - Container's working directory.
- compartment
Id String - The OCID of the compartment in which to list resources.
- 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 batch task environment description.
- display
Name String - A filter to return only resources that match the given display name exactly.
- 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"} - id String
- The OCID of the batch task environment.
- image
Url String - The URL of the ocir image.
- security
Contexts List<Property Map> - Security context for container runtime configuration.
- state String
- A filter to return only resources that match the given lifecycle state. The state value is case-insensitive.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"} - time
Created String - The date and time the batch task environment was created, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - time
Updated String - The date and time the batch task environment was updated, in the format defined by RFC 3339. Example:
2016-08-25T21:10:29.600Z - volumes List<Property Map>
- List of volumes attached to the image. The use cases of the volumes are but not limited to: read the input of the task and write the output.
- working
Directory String - Container's working directory.
GetBatchBatchTaskEnvironmentsBatchTaskEnvironmentCollectionItemSecurityContext
- Fs
Group int - A special supplemental group ID that applies to all containers in a pod.
- Run
As intGroup - Group ID for running processes inside the container.
- Run
As intUser - User ID for running processes inside the container.
- Fs
Group int - A special supplemental group ID that applies to all containers in a pod.
- Run
As intGroup - Group ID for running processes inside the container.
- Run
As intUser - User ID for running processes inside the container.
- fs
Group Integer - A special supplemental group ID that applies to all containers in a pod.
- run
As IntegerGroup - Group ID for running processes inside the container.
- run
As IntegerUser - User ID for running processes inside the container.
- fs
Group number - A special supplemental group ID that applies to all containers in a pod.
- run
As numberGroup - Group ID for running processes inside the container.
- run
As numberUser - User ID for running processes inside the container.
- fs_
group int - A special supplemental group ID that applies to all containers in a pod.
- run_
as_ intgroup - Group ID for running processes inside the container.
- run_
as_ intuser - User ID for running processes inside the container.
- fs
Group Number - A special supplemental group ID that applies to all containers in a pod.
- run
As NumberGroup - Group ID for running processes inside the container.
- run
As NumberUser - User ID for running processes inside the container.
GetBatchBatchTaskEnvironmentsBatchTaskEnvironmentCollectionItemVolume
- Local
Mount stringDirectory Path - The local path to mount the NFS share to.
- Mount
Target stringExport Path - The path to the directory on the NFS server to be mounted.
- Mount
Target stringFqdn - The FQDN of the NFS server to connect to.
- Name string
- The name of the NfsVolume.
- Type string
- Discriminator for sub-entities.
- Local
Mount stringDirectory Path - The local path to mount the NFS share to.
- Mount
Target stringExport Path - The path to the directory on the NFS server to be mounted.
- Mount
Target stringFqdn - The FQDN of the NFS server to connect to.
- Name string
- The name of the NfsVolume.
- Type string
- Discriminator for sub-entities.
- local
Mount StringDirectory Path - The local path to mount the NFS share to.
- mount
Target StringExport Path - The path to the directory on the NFS server to be mounted.
- mount
Target StringFqdn - The FQDN of the NFS server to connect to.
- name String
- The name of the NfsVolume.
- type String
- Discriminator for sub-entities.
- local
Mount stringDirectory Path - The local path to mount the NFS share to.
- mount
Target stringExport Path - The path to the directory on the NFS server to be mounted.
- mount
Target stringFqdn - The FQDN of the NFS server to connect to.
- name string
- The name of the NfsVolume.
- type string
- Discriminator for sub-entities.
- local_
mount_ strdirectory_ path - The local path to mount the NFS share to.
- mount_
target_ strexport_ path - The path to the directory on the NFS server to be mounted.
- mount_
target_ strfqdn - The FQDN of the NFS server to connect to.
- name str
- The name of the NfsVolume.
- type str
- Discriminator for sub-entities.
- local
Mount StringDirectory Path - The local path to mount the NFS share to.
- mount
Target StringExport Path - The path to the directory on the NFS server to be mounted.
- mount
Target StringFqdn - The FQDN of the NFS server to connect to.
- name String
- The name of the NfsVolume.
- type String
- Discriminator for sub-entities.
GetBatchBatchTaskEnvironmentsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ociTerraform Provider.
