Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi
yandex.getVpcSecurityGroup
Explore with Pulumi AI
Get information about a Yandex VPC Security Group. For more information, see Yandex.Cloud VPC.
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const group1 = pulumi.output(yandex.getVpcSecurityGroup({
securityGroupId: "my-id",
}));
import pulumi
import pulumi_yandex as yandex
group1 = yandex.get_vpc_security_group(security_group_id="my-id")
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var group1 = Output.Create(Yandex.GetVpcSecurityGroup.InvokeAsync(new Yandex.GetVpcSecurityGroupArgs
{
SecurityGroupId = "my-id",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "my-id"
_, err := yandex.LookupVpcSecurityGroup(ctx, &GetVpcSecurityGroupArgs{
SecurityGroupId: &opt0,
}, nil)
if err != nil {
return err
}
return nil
})
}
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const group1 = pulumi.output(yandex.getVpcSecurityGroup({
name: "my-group1",
}));
import pulumi
import pulumi_yandex as yandex
group1 = yandex.get_vpc_security_group(name="my-group1")
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
public MyStack()
{
var group1 = Output.Create(Yandex.GetVpcSecurityGroup.InvokeAsync(new Yandex.GetVpcSecurityGroupArgs
{
Name = "my-group1",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
opt0 := "my-group1"
_, err := yandex.LookupVpcSecurityGroup(ctx, &GetVpcSecurityGroupArgs{
Name: &opt0,
}, nil)
if err != nil {
return err
}
return nil
})
}
This data source is used to define Security Group that can be used by other resources.
Using getVpcSecurityGroup
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 getVpcSecurityGroup(args: GetVpcSecurityGroupArgs, opts?: InvokeOptions): Promise<GetVpcSecurityGroupResult>
function getVpcSecurityGroupOutput(args: GetVpcSecurityGroupOutputArgs, opts?: InvokeOptions): Output<GetVpcSecurityGroupResult>
def get_vpc_security_group(folder_id: Optional[str] = None,
name: Optional[str] = None,
security_group_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcSecurityGroupResult
def get_vpc_security_group_output(folder_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
security_group_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcSecurityGroupResult]
func LookupVpcSecurityGroup(ctx *Context, args *LookupVpcSecurityGroupArgs, opts ...InvokeOption) (*LookupVpcSecurityGroupResult, error)
func LookupVpcSecurityGroupOutput(ctx *Context, args *LookupVpcSecurityGroupOutputArgs, opts ...InvokeOption) LookupVpcSecurityGroupResultOutput
> Note: This function is named LookupVpcSecurityGroup
in the Go SDK.
public static class GetVpcSecurityGroup
{
public static Task<GetVpcSecurityGroupResult> InvokeAsync(GetVpcSecurityGroupArgs args, InvokeOptions? opts = null)
public static Output<GetVpcSecurityGroupResult> Invoke(GetVpcSecurityGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcSecurityGroupResult> getVpcSecurityGroup(GetVpcSecurityGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: yandex:index/getVpcSecurityGroup:getVpcSecurityGroup
arguments:
# arguments dictionary
The following arguments are supported:
- Folder
Id string - Folder that the resource belongs to. If value is omitted, the default provider folder is used.
- Name string
- Name of the security group.
- Security
Group stringId - Security Group ID.
- Folder
Id string - Folder that the resource belongs to. If value is omitted, the default provider folder is used.
- Name string
- Name of the security group.
- Security
Group stringId - Security Group ID.
- folder
Id String - Folder that the resource belongs to. If value is omitted, the default provider folder is used.
- name String
- Name of the security group.
- security
Group StringId - Security Group ID.
- folder
Id string - Folder that the resource belongs to. If value is omitted, the default provider folder is used.
- name string
- Name of the security group.
- security
Group stringId - Security Group ID.
- folder_
id str - Folder that the resource belongs to. If value is omitted, the default provider folder is used.
- name str
- Name of the security group.
- security_
group_ strid - Security Group ID.
- folder
Id String - Folder that the resource belongs to. If value is omitted, the default provider folder is used.
- name String
- Name of the security group.
- security
Group StringId - Security Group ID.
getVpcSecurityGroup Result
The following output properties are available:
- Created
At string - Creation timestamp of this security group.
- Description string
- Description of the rule.
- Egresses
List<Get
Vpc Security Group Egress> - A list of egress rules. The structure is documented below.
- Folder
Id string - ID of the folder this security group belongs to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ingresses
List<Get
Vpc Security Group Ingress> - A list of ingress rules. The structure is documented below.
- Labels Dictionary<string, string>
- Labels to assign to this rule.
- Name string
- Name of the security group.
- Network
Id string - ID of the network this security group belongs to.
- Security
Group stringId - Target security group ID for this rule.
- Status string
- Status of this security group.
- Created
At string - Creation timestamp of this security group.
- Description string
- Description of the rule.
- Egresses
[]Get
Vpc Security Group Egress - A list of egress rules. The structure is documented below.
- Folder
Id string - ID of the folder this security group belongs to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ingresses
[]Get
Vpc Security Group Ingress - A list of ingress rules. The structure is documented below.
- Labels map[string]string
- Labels to assign to this rule.
- Name string
- Name of the security group.
- Network
Id string - ID of the network this security group belongs to.
- Security
Group stringId - Target security group ID for this rule.
- Status string
- Status of this security group.
- created
At String - Creation timestamp of this security group.
- description String
- Description of the rule.
- egresses
List<Get
Vpc Security Group Egress> - A list of egress rules. The structure is documented below.
- folder
Id String - ID of the folder this security group belongs to.
- id String
- The provider-assigned unique ID for this managed resource.
- ingresses
List<Get
Vpc Security Group Ingress> - A list of ingress rules. The structure is documented below.
- labels Map<String,String>
- Labels to assign to this rule.
- name String
- Name of the security group.
- network
Id String - ID of the network this security group belongs to.
- security
Group StringId - Target security group ID for this rule.
- status String
- Status of this security group.
- created
At string - Creation timestamp of this security group.
- description string
- Description of the rule.
- egresses
Get
Vpc Security Group Egress[] - A list of egress rules. The structure is documented below.
- folder
Id string - ID of the folder this security group belongs to.
- id string
- The provider-assigned unique ID for this managed resource.
- ingresses
Get
Vpc Security Group Ingress[] - A list of ingress rules. The structure is documented below.
- labels {[key: string]: string}
- Labels to assign to this rule.
- name string
- Name of the security group.
- network
Id string - ID of the network this security group belongs to.
- security
Group stringId - Target security group ID for this rule.
- status string
- Status of this security group.
- created_
at str - Creation timestamp of this security group.
- description str
- Description of the rule.
- egresses
Sequence[Get
Vpc Security Group Egress] - A list of egress rules. The structure is documented below.
- folder_
id str - ID of the folder this security group belongs to.
- id str
- The provider-assigned unique ID for this managed resource.
- ingresses
Sequence[Get
Vpc Security Group Ingress] - A list of ingress rules. The structure is documented below.
- labels Mapping[str, str]
- Labels to assign to this rule.
- name str
- Name of the security group.
- network_
id str - ID of the network this security group belongs to.
- security_
group_ strid - Target security group ID for this rule.
- status str
- Status of this security group.
- created
At String - Creation timestamp of this security group.
- description String
- Description of the rule.
- egresses List<Property Map>
- A list of egress rules. The structure is documented below.
- folder
Id String - ID of the folder this security group belongs to.
- id String
- The provider-assigned unique ID for this managed resource.
- ingresses List<Property Map>
- A list of ingress rules. The structure is documented below.
- labels Map<String>
- Labels to assign to this rule.
- name String
- Name of the security group.
- network
Id String - ID of the network this security group belongs to.
- security
Group StringId - Target security group ID for this rule.
- status String
- Status of this security group.
Supporting Types
GetVpcSecurityGroupEgress
- Description string
- Description of the rule.
- From
Port int - Minimum port number.
- Id string
- Id of the rule.
- Labels Dictionary<string, string>
- Labels to assign to this rule.
- Port int
- Port number (if applied to a single port).
- Predefined
Target string - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - Protocol string
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - Security
Group stringId - Security Group ID.
- To
Port int - Maximum port number.
- V4Cidr
Blocks List<string> - The blocks of IPv4 addresses for this rule.
- V6Cidr
Blocks List<string> - The blocks of IPv6 addresses for this rule.
- Description string
- Description of the rule.
- From
Port int - Minimum port number.
- Id string
- Id of the rule.
- Labels map[string]string
- Labels to assign to this rule.
- Port int
- Port number (if applied to a single port).
- Predefined
Target string - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - Protocol string
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - Security
Group stringId - Security Group ID.
- To
Port int - Maximum port number.
- V4Cidr
Blocks []string - The blocks of IPv4 addresses for this rule.
- V6Cidr
Blocks []string - The blocks of IPv6 addresses for this rule.
- description String
- Description of the rule.
- from
Port Integer - Minimum port number.
- id String
- Id of the rule.
- labels Map<String,String>
- Labels to assign to this rule.
- port Integer
- Port number (if applied to a single port).
- predefined
Target String - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - protocol String
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - security
Group StringId - Security Group ID.
- to
Port Integer - Maximum port number.
- v4Cidr
Blocks List<String> - The blocks of IPv4 addresses for this rule.
- v6Cidr
Blocks List<String> - The blocks of IPv6 addresses for this rule.
- description string
- Description of the rule.
- from
Port number - Minimum port number.
- id string
- Id of the rule.
- labels {[key: string]: string}
- Labels to assign to this rule.
- port number
- Port number (if applied to a single port).
- predefined
Target string - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - protocol string
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - security
Group stringId - Security Group ID.
- to
Port number - Maximum port number.
- v4Cidr
Blocks string[] - The blocks of IPv4 addresses for this rule.
- v6Cidr
Blocks string[] - The blocks of IPv6 addresses for this rule.
- description str
- Description of the rule.
- from_
port int - Minimum port number.
- id str
- Id of the rule.
- labels Mapping[str, str]
- Labels to assign to this rule.
- port int
- Port number (if applied to a single port).
- predefined_
target str - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - protocol str
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - security_
group_ strid - Security Group ID.
- to_
port int - Maximum port number.
- v4_
cidr_ Sequence[str]blocks - The blocks of IPv4 addresses for this rule.
- v6_
cidr_ Sequence[str]blocks - The blocks of IPv6 addresses for this rule.
- description String
- Description of the rule.
- from
Port Number - Minimum port number.
- id String
- Id of the rule.
- labels Map<String>
- Labels to assign to this rule.
- port Number
- Port number (if applied to a single port).
- predefined
Target String - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - protocol String
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - security
Group StringId - Security Group ID.
- to
Port Number - Maximum port number.
- v4Cidr
Blocks List<String> - The blocks of IPv4 addresses for this rule.
- v6Cidr
Blocks List<String> - The blocks of IPv6 addresses for this rule.
GetVpcSecurityGroupIngress
- Description string
- Description of the rule.
- From
Port int - Minimum port number.
- Id string
- Id of the rule.
- Labels Dictionary<string, string>
- Labels to assign to this rule.
- Port int
- Port number (if applied to a single port).
- Predefined
Target string - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - Protocol string
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - Security
Group stringId - Security Group ID.
- To
Port int - Maximum port number.
- V4Cidr
Blocks List<string> - The blocks of IPv4 addresses for this rule.
- V6Cidr
Blocks List<string> - The blocks of IPv6 addresses for this rule.
- Description string
- Description of the rule.
- From
Port int - Minimum port number.
- Id string
- Id of the rule.
- Labels map[string]string
- Labels to assign to this rule.
- Port int
- Port number (if applied to a single port).
- Predefined
Target string - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - Protocol string
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - Security
Group stringId - Security Group ID.
- To
Port int - Maximum port number.
- V4Cidr
Blocks []string - The blocks of IPv4 addresses for this rule.
- V6Cidr
Blocks []string - The blocks of IPv6 addresses for this rule.
- description String
- Description of the rule.
- from
Port Integer - Minimum port number.
- id String
- Id of the rule.
- labels Map<String,String>
- Labels to assign to this rule.
- port Integer
- Port number (if applied to a single port).
- predefined
Target String - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - protocol String
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - security
Group StringId - Security Group ID.
- to
Port Integer - Maximum port number.
- v4Cidr
Blocks List<String> - The blocks of IPv4 addresses for this rule.
- v6Cidr
Blocks List<String> - The blocks of IPv6 addresses for this rule.
- description string
- Description of the rule.
- from
Port number - Minimum port number.
- id string
- Id of the rule.
- labels {[key: string]: string}
- Labels to assign to this rule.
- port number
- Port number (if applied to a single port).
- predefined
Target string - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - protocol string
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - security
Group stringId - Security Group ID.
- to
Port number - Maximum port number.
- v4Cidr
Blocks string[] - The blocks of IPv4 addresses for this rule.
- v6Cidr
Blocks string[] - The blocks of IPv6 addresses for this rule.
- description str
- Description of the rule.
- from_
port int - Minimum port number.
- id str
- Id of the rule.
- labels Mapping[str, str]
- Labels to assign to this rule.
- port int
- Port number (if applied to a single port).
- predefined_
target str - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - protocol str
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - security_
group_ strid - Security Group ID.
- to_
port int - Maximum port number.
- v4_
cidr_ Sequence[str]blocks - The blocks of IPv4 addresses for this rule.
- v6_
cidr_ Sequence[str]blocks - The blocks of IPv6 addresses for this rule.
- description String
- Description of the rule.
- from
Port Number - Minimum port number.
- id String
- Id of the rule.
- labels Map<String>
- Labels to assign to this rule.
- port Number
- Port number (if applied to a single port).
- predefined
Target String - Special-purpose targets.
self_security_group
refers to this particular security group.loadbalancer_healthchecks
represents loadbalancer health check nodes. - protocol String
- One of
ANY
,TCP
,UDP
,ICMP
,IPV6_ICMP
. - security
Group StringId - Security Group ID.
- to
Port Number - Maximum port number.
- v4Cidr
Blocks List<String> - The blocks of IPv4 addresses for this rule.
- v6Cidr
Blocks List<String> - The blocks of IPv6 addresses for this rule.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
yandex
Terraform Provider.