octopusdeploy 0.43.2 published on Friday, May 30, 2025 by octopusdeploylabs
octopusdeploy.getEnvironments
Start a Neo task
Explain and create an octopusdeploy.getEnvironments resource
octopusdeploy 0.43.2 published on Friday, May 30, 2025 by octopusdeploylabs
Provides information about existing environments.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as octopusdeploy from "@pulumi/octopusdeploy";
const example = octopusdeploy.getEnvironments({
ids: [
"Environments-123",
"Environments-321",
],
name: "Production",
partialName: "Produc",
skip: 5,
take: 100,
});
import pulumi
import pulumi_octopusdeploy as octopusdeploy
example = octopusdeploy.get_environments(ids=[
"Environments-123",
"Environments-321",
],
name="Production",
partial_name="Produc",
skip=5,
take=100)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/octopusdeploy/octopusdeploy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := octopusdeploy.GetEnvironments(ctx, &octopusdeploy.GetEnvironmentsArgs{
Ids: []string{
"Environments-123",
"Environments-321",
},
Name: pulumi.StringRef("Production"),
PartialName: pulumi.StringRef("Produc"),
Skip: pulumi.Float64Ref(5),
Take: pulumi.Float64Ref(100),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Octopusdeploy = Pulumi.Octopusdeploy;
return await Deployment.RunAsync(() =>
{
var example = Octopusdeploy.GetEnvironments.Invoke(new()
{
Ids = new[]
{
"Environments-123",
"Environments-321",
},
Name = "Production",
PartialName = "Produc",
Skip = 5,
Take = 100,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.octopusdeploy.OctopusdeployFunctions;
import com.pulumi.octopusdeploy.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 example = OctopusdeployFunctions.getEnvironments(GetEnvironmentsArgs.builder()
.ids(
"Environments-123",
"Environments-321")
.name("Production")
.partialName("Produc")
.skip(5)
.take(100)
.build());
}
}
variables:
example:
fn::invoke:
function: octopusdeploy:getEnvironments
arguments:
ids:
- Environments-123
- Environments-321
name: Production
partialName: Produc
skip: 5
take: 100
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(ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
partial_name: Optional[str] = None,
skip: Optional[float] = None,
space_id: Optional[str] = None,
take: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetEnvironmentsResult
def get_environments_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
partial_name: Optional[pulumi.Input[str]] = None,
skip: Optional[pulumi.Input[float]] = None,
space_id: Optional[pulumi.Input[str]] = None,
take: Optional[pulumi.Input[float]] = 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)
public static Output<GetEnvironmentsResult> getEnvironments(GetEnvironmentsArgs args, InvokeOptions options)
fn::invoke:
function: octopusdeploy:index/getEnvironments:getEnvironments
arguments:
# arguments dictionaryThe following arguments are supported:
- Ids List<string>
- A filter to search by a list of IDs.
- Name string
- A filter search by exact name
- Partial
Name string - A filter to search by a partial name.
- Skip double
- A filter to specify the number of items to skip in the response.
- Space
Id string - The space ID associated with this environment.
- Take double
- A filter to specify the number of items to take (or return) in the response.
- Ids []string
- A filter to search by a list of IDs.
- Name string
- A filter search by exact name
- Partial
Name string - A filter to search by a partial name.
- Skip float64
- A filter to specify the number of items to skip in the response.
- Space
Id string - The space ID associated with this environment.
- Take float64
- A filter to specify the number of items to take (or return) in the response.
- ids List<String>
- A filter to search by a list of IDs.
- name String
- A filter search by exact name
- partial
Name String - A filter to search by a partial name.
- skip Double
- A filter to specify the number of items to skip in the response.
- space
Id String - The space ID associated with this environment.
- take Double
- A filter to specify the number of items to take (or return) in the response.
- ids string[]
- A filter to search by a list of IDs.
- name string
- A filter search by exact name
- partial
Name string - A filter to search by a partial name.
- skip number
- A filter to specify the number of items to skip in the response.
- space
Id string - The space ID associated with this environment.
- take number
- A filter to specify the number of items to take (or return) in the response.
- ids Sequence[str]
- A filter to search by a list of IDs.
- name str
- A filter search by exact name
- partial_
name str - A filter to search by a partial name.
- skip float
- A filter to specify the number of items to skip in the response.
- space_
id str - The space ID associated with this environment.
- take float
- A filter to specify the number of items to take (or return) in the response.
- ids List<String>
- A filter to search by a list of IDs.
- name String
- A filter search by exact name
- partial
Name String - A filter to search by a partial name.
- skip Number
- A filter to specify the number of items to skip in the response.
- space
Id String - The space ID associated with this environment.
- take Number
- A filter to specify the number of items to take (or return) in the response.
getEnvironments Result
The following output properties are available:
- Environments
List<Get
Environments Environment> - Id string
- The unique ID for this resource.
- Space
Id string - The space ID associated with this environment.
- Ids List<string>
- A filter to search by a list of IDs.
- Name string
- A filter search by exact name
- Partial
Name string - A filter to search by a partial name.
- Skip double
- A filter to specify the number of items to skip in the response.
- Take double
- A filter to specify the number of items to take (or return) in the response.
- Environments
[]Get
Environments Environment - Id string
- The unique ID for this resource.
- Space
Id string - The space ID associated with this environment.
- Ids []string
- A filter to search by a list of IDs.
- Name string
- A filter search by exact name
- Partial
Name string - A filter to search by a partial name.
- Skip float64
- A filter to specify the number of items to skip in the response.
- Take float64
- A filter to specify the number of items to take (or return) in the response.
- environments
List<Get
Environments Environment> - id String
- The unique ID for this resource.
- space
Id String - The space ID associated with this environment.
- ids List<String>
- A filter to search by a list of IDs.
- name String
- A filter search by exact name
- partial
Name String - A filter to search by a partial name.
- skip Double
- A filter to specify the number of items to skip in the response.
- take Double
- A filter to specify the number of items to take (or return) in the response.
- environments
Get
Environments Environment[] - id string
- The unique ID for this resource.
- space
Id string - The space ID associated with this environment.
- ids string[]
- A filter to search by a list of IDs.
- name string
- A filter search by exact name
- partial
Name string - A filter to search by a partial name.
- skip number
- A filter to specify the number of items to skip in the response.
- take number
- A filter to specify the number of items to take (or return) in the response.
- environments
Sequence[Get
Environments Environment] - id str
- The unique ID for this resource.
- space_
id str - The space ID associated with this environment.
- ids Sequence[str]
- A filter to search by a list of IDs.
- name str
- A filter search by exact name
- partial_
name str - A filter to search by a partial name.
- skip float
- A filter to specify the number of items to skip in the response.
- take float
- A filter to specify the number of items to take (or return) in the response.
- environments List<Property Map>
- id String
- The unique ID for this resource.
- space
Id String - The space ID associated with this environment.
- ids List<String>
- A filter to search by a list of IDs.
- name String
- A filter search by exact name
- partial
Name String - A filter to search by a partial name.
- skip Number
- A filter to specify the number of items to skip in the response.
- take Number
- A filter to specify the number of items to take (or return) in the response.
Supporting Types
GetEnvironmentsEnvironment
- Allow
Dynamic boolInfrastructure - Description string
- The description of this environment.
- Id string
- The unique ID for this resource.
- Jira
Extension List<GetSettings Environments Environment Jira Extension Setting> - Provides extension settings for the Jira integration for this environment.
- Jira
Service List<GetManagement Extension Settings Environments Environment Jira Service Management Extension Setting> - Provides extension settings for the Jira Service Management (JSM) integration for this environment.
- Name string
- The name of this resource.
- Servicenow
Extension List<GetSettings Environments Environment Servicenow Extension Setting> - Provides extension settings for the ServiceNow integration for this environment.
- Slug string
- The unique slug of this environment
- Sort
Order double - The order number to sort an environment
- Space
Id string - The space ID associated with this environment.
- Use
Guided boolFailure
- Allow
Dynamic boolInfrastructure - Description string
- The description of this environment.
- Id string
- The unique ID for this resource.
- Jira
Extension []GetSettings Environments Environment Jira Extension Setting - Provides extension settings for the Jira integration for this environment.
- Jira
Service []GetManagement Extension Settings Environments Environment Jira Service Management Extension Setting - Provides extension settings for the Jira Service Management (JSM) integration for this environment.
- Name string
- The name of this resource.
- Servicenow
Extension []GetSettings Environments Environment Servicenow Extension Setting - Provides extension settings for the ServiceNow integration for this environment.
- Slug string
- The unique slug of this environment
- Sort
Order float64 - The order number to sort an environment
- Space
Id string - The space ID associated with this environment.
- Use
Guided boolFailure
- allow
Dynamic BooleanInfrastructure - description String
- The description of this environment.
- id String
- The unique ID for this resource.
- jira
Extension List<GetSettings Environments Environment Jira Extension Setting> - Provides extension settings for the Jira integration for this environment.
- jira
Service List<GetManagement Extension Settings Environments Environment Jira Service Management Extension Setting> - Provides extension settings for the Jira Service Management (JSM) integration for this environment.
- name String
- The name of this resource.
- servicenow
Extension List<GetSettings Environments Environment Servicenow Extension Setting> - Provides extension settings for the ServiceNow integration for this environment.
- slug String
- The unique slug of this environment
- sort
Order Double - The order number to sort an environment
- space
Id String - The space ID associated with this environment.
- use
Guided BooleanFailure
- allow
Dynamic booleanInfrastructure - description string
- The description of this environment.
- id string
- The unique ID for this resource.
- jira
Extension GetSettings Environments Environment Jira Extension Setting[] - Provides extension settings for the Jira integration for this environment.
- jira
Service GetManagement Extension Settings Environments Environment Jira Service Management Extension Setting[] - Provides extension settings for the Jira Service Management (JSM) integration for this environment.
- name string
- The name of this resource.
- servicenow
Extension GetSettings Environments Environment Servicenow Extension Setting[] - Provides extension settings for the ServiceNow integration for this environment.
- slug string
- The unique slug of this environment
- sort
Order number - The order number to sort an environment
- space
Id string - The space ID associated with this environment.
- use
Guided booleanFailure
- allow_
dynamic_ boolinfrastructure - description str
- The description of this environment.
- id str
- The unique ID for this resource.
- jira_
extension_ Sequence[Getsettings Environments Environment Jira Extension Setting] - Provides extension settings for the Jira integration for this environment.
- jira_
service_ Sequence[Getmanagement_ extension_ settings Environments Environment Jira Service Management Extension Setting] - Provides extension settings for the Jira Service Management (JSM) integration for this environment.
- name str
- The name of this resource.
- servicenow_
extension_ Sequence[Getsettings Environments Environment Servicenow Extension Setting] - Provides extension settings for the ServiceNow integration for this environment.
- slug str
- The unique slug of this environment
- sort_
order float - The order number to sort an environment
- space_
id str - The space ID associated with this environment.
- use_
guided_ boolfailure
- allow
Dynamic BooleanInfrastructure - description String
- The description of this environment.
- id String
- The unique ID for this resource.
- jira
Extension List<Property Map>Settings - Provides extension settings for the Jira integration for this environment.
- jira
Service List<Property Map>Management Extension Settings - Provides extension settings for the Jira Service Management (JSM) integration for this environment.
- name String
- The name of this resource.
- servicenow
Extension List<Property Map>Settings - Provides extension settings for the ServiceNow integration for this environment.
- slug String
- The unique slug of this environment
- sort
Order Number - The order number to sort an environment
- space
Id String - The space ID associated with this environment.
- use
Guided BooleanFailure
GetEnvironmentsEnvironmentJiraExtensionSetting
- Environment
Type string
- Environment
Type string
- environment
Type String
- environment
Type string
- environment_
type str
- environment
Type String
GetEnvironmentsEnvironmentJiraServiceManagementExtensionSetting
- Is
Enabled bool
- Is
Enabled bool
- is
Enabled Boolean
- is
Enabled boolean
- is_
enabled bool
- is
Enabled Boolean
GetEnvironmentsEnvironmentServicenowExtensionSetting
- Is
Enabled bool
- Is
Enabled bool
- is
Enabled Boolean
- is
Enabled boolean
- is_
enabled bool
- is
Enabled Boolean
Package Details
- Repository
- octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
- License
- Notes
- This Pulumi package is based on the
octopusdeployTerraform Provider.
octopusdeploy 0.43.2 published on Friday, May 30, 2025 by octopusdeploylabs
