outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale
outscale.getSecurityGroups
Explore with Pulumi AI
Provides information about security groups.
For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";
const securityGroups01 = outscale.getSecurityGroups({
filters: [
{
name: "net_ids",
values: [
"sg-12345678",
"sg-87654321",
],
},
{
name: "inbound_rule_ip_ranges",
values: ["111.11.111.1/32"],
},
],
});
import pulumi
import pulumi_outscale as outscale
security_groups01 = outscale.get_security_groups(filters=[
{
"name": "net_ids",
"values": [
"sg-12345678",
"sg-87654321",
],
},
{
"name": "inbound_rule_ip_ranges",
"values": ["111.11.111.1/32"],
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := outscale.GetSecurityGroups(ctx, &outscale.GetSecurityGroupsArgs{
Filters: []outscale.GetSecurityGroupsFilter{
{
Name: "net_ids",
Values: []string{
"sg-12345678",
"sg-87654321",
},
},
{
Name: "inbound_rule_ip_ranges",
Values: []string{
"111.11.111.1/32",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;
return await Deployment.RunAsync(() =>
{
var securityGroups01 = Outscale.GetSecurityGroups.Invoke(new()
{
Filters = new[]
{
new Outscale.Inputs.GetSecurityGroupsFilterInputArgs
{
Name = "net_ids",
Values = new[]
{
"sg-12345678",
"sg-87654321",
},
},
new Outscale.Inputs.GetSecurityGroupsFilterInputArgs
{
Name = "inbound_rule_ip_ranges",
Values = new[]
{
"111.11.111.1/32",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetSecurityGroupsArgs;
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 securityGroups01 = OutscaleFunctions.getSecurityGroups(GetSecurityGroupsArgs.builder()
.filters(
GetSecurityGroupsFilterArgs.builder()
.name("net_ids")
.values(
"sg-12345678",
"sg-87654321")
.build(),
GetSecurityGroupsFilterArgs.builder()
.name("inbound_rule_ip_ranges")
.values("111.11.111.1/32")
.build())
.build());
}
}
variables:
securityGroups01:
fn::invoke:
function: outscale:getSecurityGroups
arguments:
filters:
- name: net_ids
values:
- sg-12345678
- sg-87654321
- name: inbound_rule_ip_ranges
values:
- 111.11.111.1/32
Using getSecurityGroups
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 getSecurityGroups(args: GetSecurityGroupsArgs, opts?: InvokeOptions): Promise<GetSecurityGroupsResult>
function getSecurityGroupsOutput(args: GetSecurityGroupsOutputArgs, opts?: InvokeOptions): Output<GetSecurityGroupsResult>
def get_security_groups(filters: Optional[Sequence[GetSecurityGroupsFilter]] = None,
id: Optional[str] = None,
security_group_ids: Optional[Sequence[str]] = None,
security_group_names: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetSecurityGroupsResult
def get_security_groups_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetSecurityGroupsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
security_group_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSecurityGroupsResult]
func GetSecurityGroups(ctx *Context, args *GetSecurityGroupsArgs, opts ...InvokeOption) (*GetSecurityGroupsResult, error)
func GetSecurityGroupsOutput(ctx *Context, args *GetSecurityGroupsOutputArgs, opts ...InvokeOption) GetSecurityGroupsResultOutput
> Note: This function is named GetSecurityGroups
in the Go SDK.
public static class GetSecurityGroups
{
public static Task<GetSecurityGroupsResult> InvokeAsync(GetSecurityGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetSecurityGroupsResult> Invoke(GetSecurityGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSecurityGroupsResult> getSecurityGroups(GetSecurityGroupsArgs args, InvokeOptions options)
public static Output<GetSecurityGroupsResult> getSecurityGroups(GetSecurityGroupsArgs args, InvokeOptions options)
fn::invoke:
function: outscale:index/getSecurityGroups:getSecurityGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Security Groups Filter> - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- Id string
- Security
Group List<string>Ids - Security
Group List<string>Names
- Filters
[]Get
Security Groups Filter - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- Id string
- Security
Group []stringIds - Security
Group []stringNames
- filters
List<Get
Security Groups Filter> - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id String
- security
Group List<String>Ids - security
Group List<String>Names
- filters
Get
Security Groups Filter[] - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id string
- security
Group string[]Ids - security
Group string[]Names
- filters
Sequence[Get
Security Groups Filter] - A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id str
- security_
group_ Sequence[str]ids - security_
group_ Sequence[str]names
- filters List<Property Map>
- A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
- id String
- security
Group List<String>Ids - security
Group List<String>Names
getSecurityGroups Result
The following output properties are available:
- Id string
- Request
Id string - Security
Groups List<GetSecurity Groups Security Group> - Information about one or more security groups.
- Filters
List<Get
Security Groups Filter> - Security
Group List<string>Ids - Security
Group List<string>Names
- Id string
- Request
Id string - Security
Groups []GetSecurity Groups Security Group - Information about one or more security groups.
- Filters
[]Get
Security Groups Filter - Security
Group []stringIds - Security
Group []stringNames
- id String
- request
Id String - security
Groups List<GetSecurity Groups Security Group> - Information about one or more security groups.
- filters
List<Get
Security Groups Filter> - security
Group List<String>Ids - security
Group List<String>Names
- id string
- request
Id string - security
Groups GetSecurity Groups Security Group[] - Information about one or more security groups.
- filters
Get
Security Groups Filter[] - security
Group string[]Ids - security
Group string[]Names
- id str
- request_
id str - security_
groups Sequence[GetSecurity Groups Security Group] - Information about one or more security groups.
- filters
Sequence[Get
Security Groups Filter] - security_
group_ Sequence[str]ids - security_
group_ Sequence[str]names
- id String
- request
Id String - security
Groups List<Property Map> - Information about one or more security groups.
- filters List<Property Map>
- security
Group List<String>Ids - security
Group List<String>Names
Supporting Types
GetSecurityGroupsFilter
GetSecurityGroupsSecurityGroup
- Account
Id This property is required. string - The account ID that owns the source or destination security group.
- Description
This property is required. string - The description of the security group.
- Inbound
Rules This property is required. List<GetSecurity Groups Security Group Inbound Rule> - The inbound rules associated with the security group.
- Net
Id This property is required. string - The ID of the Net for the security group.
- Outbound
Rules This property is required. List<GetSecurity Groups Security Group Outbound Rule> - The outbound rules associated with the security group.
- Security
Group Id This property is required. string - The ID of the security group.
- Security
Group Name This property is required. string - The name of the security group.
This property is required. List<GetSecurity Groups Security Group Tag> - One or more tags associated with the security group.
- Account
Id This property is required. string - The account ID that owns the source or destination security group.
- Description
This property is required. string - The description of the security group.
- Inbound
Rules This property is required. []GetSecurity Groups Security Group Inbound Rule - The inbound rules associated with the security group.
- Net
Id This property is required. string - The ID of the Net for the security group.
- Outbound
Rules This property is required. []GetSecurity Groups Security Group Outbound Rule - The outbound rules associated with the security group.
- Security
Group Id This property is required. string - The ID of the security group.
- Security
Group Name This property is required. string - The name of the security group.
This property is required. []GetSecurity Groups Security Group Tag - One or more tags associated with the security group.
- account
Id This property is required. String - The account ID that owns the source or destination security group.
- description
This property is required. String - The description of the security group.
- inbound
Rules This property is required. List<GetSecurity Groups Security Group Inbound Rule> - The inbound rules associated with the security group.
- net
Id This property is required. String - The ID of the Net for the security group.
- outbound
Rules This property is required. List<GetSecurity Groups Security Group Outbound Rule> - The outbound rules associated with the security group.
- security
Group Id This property is required. String - The ID of the security group.
- security
Group Name This property is required. String - The name of the security group.
This property is required. List<GetSecurity Groups Security Group Tag> - One or more tags associated with the security group.
- account
Id This property is required. string - The account ID that owns the source or destination security group.
- description
This property is required. string - The description of the security group.
- inbound
Rules This property is required. GetSecurity Groups Security Group Inbound Rule[] - The inbound rules associated with the security group.
- net
Id This property is required. string - The ID of the Net for the security group.
- outbound
Rules This property is required. GetSecurity Groups Security Group Outbound Rule[] - The outbound rules associated with the security group.
- security
Group Id This property is required. string - The ID of the security group.
- security
Group Name This property is required. string - The name of the security group.
This property is required. GetSecurity Groups Security Group Tag[] - One or more tags associated with the security group.
- account_
id This property is required. str - The account ID that owns the source or destination security group.
- description
This property is required. str - The description of the security group.
- inbound_
rules This property is required. Sequence[GetSecurity Groups Security Group Inbound Rule] - The inbound rules associated with the security group.
- net_
id This property is required. str - The ID of the Net for the security group.
- outbound_
rules This property is required. Sequence[GetSecurity Groups Security Group Outbound Rule] - The outbound rules associated with the security group.
- security_
group_ id This property is required. str - The ID of the security group.
- security_
group_ name This property is required. str - The name of the security group.
This property is required. Sequence[GetSecurity Groups Security Group Tag] - One or more tags associated with the security group.
- account
Id This property is required. String - The account ID that owns the source or destination security group.
- description
This property is required. String - The description of the security group.
- inbound
Rules This property is required. List<Property Map> - The inbound rules associated with the security group.
- net
Id This property is required. String - The ID of the Net for the security group.
- outbound
Rules This property is required. List<Property Map> - The outbound rules associated with the security group.
- security
Group Id This property is required. String - The ID of the security group.
- security
Group Name This property is required. String - The name of the security group.
This property is required. List<Property Map>- One or more tags associated with the security group.
GetSecurityGroupsSecurityGroupInboundRule
- From
Port Range This property is required. double - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- Ip
Protocol This property is required. string - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - Ip
Ranges This property is required. List<string> - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - Prefix
List Ids This property is required. List<string> - Security
Groups Members This property is required. List<GetSecurity Groups Security Group Inbound Rule Security Groups Member> - Information about one or more source or destination security groups.
- To
Port Range This property is required. double - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- From
Port Range This property is required. float64 - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- Ip
Protocol This property is required. string - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - Ip
Ranges This property is required. []string - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - Prefix
List Ids This property is required. []string - Security
Groups Members This property is required. []GetSecurity Groups Security Group Inbound Rule Security Groups Member - Information about one or more source or destination security groups.
- To
Port Range This property is required. float64 - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- from
Port Range This property is required. Double - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- ip
Protocol This property is required. String - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - ip
Ranges This property is required. List<String> - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - prefix
List Ids This property is required. List<String> - security
Groups Members This property is required. List<GetSecurity Groups Security Group Inbound Rule Security Groups Member> - Information about one or more source or destination security groups.
- to
Port Range This property is required. Double - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- from
Port Range This property is required. number - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- ip
Protocol This property is required. string - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - ip
Ranges This property is required. string[] - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - prefix
List Ids This property is required. string[] - security
Groups Members This property is required. GetSecurity Groups Security Group Inbound Rule Security Groups Member[] - Information about one or more source or destination security groups.
- to
Port Range This property is required. number - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- from_
port_ range This property is required. float - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- ip_
protocol This property is required. str - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - ip_
ranges This property is required. Sequence[str] - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - prefix_
list_ ids This property is required. Sequence[str] - security_
groups_ members This property is required. Sequence[GetSecurity Groups Security Group Inbound Rule Security Groups Member] - Information about one or more source or destination security groups.
- to_
port_ range This property is required. float - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- from
Port Range This property is required. Number - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- ip
Protocol This property is required. String - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - ip
Ranges This property is required. List<String> - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - prefix
List Ids This property is required. List<String> - security
Groups Members This property is required. List<Property Map> - Information about one or more source or destination security groups.
- to
Port Range This property is required. Number - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
GetSecurityGroupsSecurityGroupInboundRuleSecurityGroupsMember
- Account
Id This property is required. string - The account ID that owns the source or destination security group.
- Security
Group Id This property is required. string - The ID of the security group.
- Security
Group Name This property is required. string - The name of the security group.
- Account
Id This property is required. string - The account ID that owns the source or destination security group.
- Security
Group Id This property is required. string - The ID of the security group.
- Security
Group Name This property is required. string - The name of the security group.
- account
Id This property is required. String - The account ID that owns the source or destination security group.
- security
Group Id This property is required. String - The ID of the security group.
- security
Group Name This property is required. String - The name of the security group.
- account
Id This property is required. string - The account ID that owns the source or destination security group.
- security
Group Id This property is required. string - The ID of the security group.
- security
Group Name This property is required. string - The name of the security group.
- account_
id This property is required. str - The account ID that owns the source or destination security group.
- security_
group_ id This property is required. str - The ID of the security group.
- security_
group_ name This property is required. str - The name of the security group.
- account
Id This property is required. String - The account ID that owns the source or destination security group.
- security
Group Id This property is required. String - The ID of the security group.
- security
Group Name This property is required. String - The name of the security group.
GetSecurityGroupsSecurityGroupOutboundRule
- From
Port Range This property is required. double - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- Ip
Protocol This property is required. string - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - Ip
Ranges This property is required. List<string> - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - Prefix
List Ids This property is required. List<string> - Security
Groups Members This property is required. List<GetSecurity Groups Security Group Outbound Rule Security Groups Member> - Information about one or more source or destination security groups.
- To
Port Range This property is required. double - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- From
Port Range This property is required. float64 - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- Ip
Protocol This property is required. string - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - Ip
Ranges This property is required. []string - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - Prefix
List Ids This property is required. []string - Security
Groups Members This property is required. []GetSecurity Groups Security Group Outbound Rule Security Groups Member - Information about one or more source or destination security groups.
- To
Port Range This property is required. float64 - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- from
Port Range This property is required. Double - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- ip
Protocol This property is required. String - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - ip
Ranges This property is required. List<String> - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - prefix
List Ids This property is required. List<String> - security
Groups Members This property is required. List<GetSecurity Groups Security Group Outbound Rule Security Groups Member> - Information about one or more source or destination security groups.
- to
Port Range This property is required. Double - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- from
Port Range This property is required. number - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- ip
Protocol This property is required. string - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - ip
Ranges This property is required. string[] - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - prefix
List Ids This property is required. string[] - security
Groups Members This property is required. GetSecurity Groups Security Group Outbound Rule Security Groups Member[] - Information about one or more source or destination security groups.
- to
Port Range This property is required. number - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- from_
port_ range This property is required. float - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- ip_
protocol This property is required. str - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - ip_
ranges This property is required. Sequence[str] - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - prefix_
list_ ids This property is required. Sequence[str] - security_
groups_ members This property is required. Sequence[GetSecurity Groups Security Group Outbound Rule Security Groups Member] - Information about one or more source or destination security groups.
- to_
port_ range This property is required. float - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
- from
Port Range This property is required. Number - The beginning of the port range for the TCP and UDP protocols, or an ICMP type number.
- ip
Protocol This property is required. String - The IP protocol name (
tcp
,udp
,icmp
, or-1
for all protocols). By default,-1
. In a Net, this can also be an IP protocol number. For more information, see the IANA.org website. - ip
Ranges This property is required. List<String> - One or more IP ranges for the security group rules, in CIDR notation (for example,
10.0.0.0/16
). - prefix
List Ids This property is required. List<String> - security
Groups Members This property is required. List<Property Map> - Information about one or more source or destination security groups.
- to
Port Range This property is required. Number - The end of the port range for the TCP and UDP protocols, or an ICMP code number.
GetSecurityGroupsSecurityGroupOutboundRuleSecurityGroupsMember
- Account
Id This property is required. string - The account ID that owns the source or destination security group.
- Security
Group Id This property is required. string - The ID of the security group.
- Security
Group Name This property is required. string - The name of the security group.
- Account
Id This property is required. string - The account ID that owns the source or destination security group.
- Security
Group Id This property is required. string - The ID of the security group.
- Security
Group Name This property is required. string - The name of the security group.
- account
Id This property is required. String - The account ID that owns the source or destination security group.
- security
Group Id This property is required. String - The ID of the security group.
- security
Group Name This property is required. String - The name of the security group.
- account
Id This property is required. string - The account ID that owns the source or destination security group.
- security
Group Id This property is required. string - The ID of the security group.
- security
Group Name This property is required. string - The name of the security group.
- account_
id This property is required. str - The account ID that owns the source or destination security group.
- security_
group_ id This property is required. str - The ID of the security group.
- security_
group_ name This property is required. str - The name of the security group.
- account
Id This property is required. String - The account ID that owns the source or destination security group.
- security
Group Id This property is required. String - The ID of the security group.
- security
Group Name This property is required. String - The name of the security group.
GetSecurityGroupsSecurityGroupTag
Package Details
- Repository
- outscale outscale/terraform-provider-outscale
- License
- Notes
- This Pulumi package is based on the
outscale
Terraform Provider.