1. Packages
  2. Scaleway
  3. API Docs
  4. getInstanceSecurityGroup
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

scaleway.getInstanceSecurityGroup

Explore with Pulumi AI

scaleway logo
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

    Gets information about a Security Group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const myKey = scaleway.getInstanceSecurityGroup({
        securityGroupId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    my_key = scaleway.get_instance_security_group(security_group_id="11111111-1111-1111-1111-111111111111")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.LookupInstanceSecurityGroup(ctx, &scaleway.LookupInstanceSecurityGroupArgs{
    			SecurityGroupId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var myKey = Scaleway.GetInstanceSecurityGroup.Invoke(new()
        {
            SecurityGroupId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetInstanceSecurityGroupArgs;
    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 myKey = ScalewayFunctions.getInstanceSecurityGroup(GetInstanceSecurityGroupArgs.builder()
                .securityGroupId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      myKey:
        fn::invoke:
          Function: scaleway:getInstanceSecurityGroup
          Arguments:
            securityGroupId: 11111111-1111-1111-1111-111111111111
    

    Using getInstanceSecurityGroup

    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 getInstanceSecurityGroup(args: GetInstanceSecurityGroupArgs, opts?: InvokeOptions): Promise<GetInstanceSecurityGroupResult>
    function getInstanceSecurityGroupOutput(args: GetInstanceSecurityGroupOutputArgs, opts?: InvokeOptions): Output<GetInstanceSecurityGroupResult>
    def get_instance_security_group(name: Optional[str] = None,
                                    project_id: Optional[str] = None,
                                    security_group_id: Optional[str] = None,
                                    zone: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetInstanceSecurityGroupResult
    def get_instance_security_group_output(name: Optional[pulumi.Input[str]] = None,
                                    project_id: Optional[pulumi.Input[str]] = None,
                                    security_group_id: Optional[pulumi.Input[str]] = None,
                                    zone: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetInstanceSecurityGroupResult]
    func LookupInstanceSecurityGroup(ctx *Context, args *LookupInstanceSecurityGroupArgs, opts ...InvokeOption) (*LookupInstanceSecurityGroupResult, error)
    func LookupInstanceSecurityGroupOutput(ctx *Context, args *LookupInstanceSecurityGroupOutputArgs, opts ...InvokeOption) LookupInstanceSecurityGroupResultOutput

    > Note: This function is named LookupInstanceSecurityGroup in the Go SDK.

    public static class GetInstanceSecurityGroup 
    {
        public static Task<GetInstanceSecurityGroupResult> InvokeAsync(GetInstanceSecurityGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetInstanceSecurityGroupResult> Invoke(GetInstanceSecurityGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInstanceSecurityGroupResult> getInstanceSecurityGroup(GetInstanceSecurityGroupArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getInstanceSecurityGroup:getInstanceSecurityGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The security group name. Only one of name and security_group_id should be specified.
    ProjectId string
    The ID of the project the security group is associated with.
    SecurityGroupId string
    The security group id. Only one of name and security_group_id should be specified.
    Zone string
    zone) The zone in which the security group exists.
    Name string
    The security group name. Only one of name and security_group_id should be specified.
    ProjectId string
    The ID of the project the security group is associated with.
    SecurityGroupId string
    The security group id. Only one of name and security_group_id should be specified.
    Zone string
    zone) The zone in which the security group exists.
    name String
    The security group name. Only one of name and security_group_id should be specified.
    projectId String
    The ID of the project the security group is associated with.
    securityGroupId String
    The security group id. Only one of name and security_group_id should be specified.
    zone String
    zone) The zone in which the security group exists.
    name string
    The security group name. Only one of name and security_group_id should be specified.
    projectId string
    The ID of the project the security group is associated with.
    securityGroupId string
    The security group id. Only one of name and security_group_id should be specified.
    zone string
    zone) The zone in which the security group exists.
    name str
    The security group name. Only one of name and security_group_id should be specified.
    project_id str
    The ID of the project the security group is associated with.
    security_group_id str
    The security group id. Only one of name and security_group_id should be specified.
    zone str
    zone) The zone in which the security group exists.
    name String
    The security group name. Only one of name and security_group_id should be specified.
    projectId String
    The ID of the project the security group is associated with.
    securityGroupId String
    The security group id. Only one of name and security_group_id should be specified.
    zone String
    zone) The zone in which the security group exists.

    getInstanceSecurityGroup Result

    The following output properties are available:

    Description string
    EnableDefaultSecurity bool
    ExternalRules bool
    Id string
    The provider-assigned unique ID for this managed resource.
    InboundDefaultPolicy string
    The default policy on incoming traffic. Possible values are: accept or drop.
    InboundRules List<Pulumiverse.Scaleway.Outputs.GetInstanceSecurityGroupInboundRule>
    A list of inbound rule to add to the security group. (Structure is documented below.)
    OrganizationId string
    The ID of the organization the security group is associated with.
    OutboundDefaultPolicy string
    The default policy on outgoing traffic. Possible values are: accept or drop.
    OutboundRules List<Pulumiverse.Scaleway.Outputs.GetInstanceSecurityGroupOutboundRule>
    A list of outbound rule to add to the security group. (Structure is documented below.)
    Stateful bool
    Tags List<string>
    Name string
    ProjectId string
    SecurityGroupId string
    Zone string
    Description string
    EnableDefaultSecurity bool
    ExternalRules bool
    Id string
    The provider-assigned unique ID for this managed resource.
    InboundDefaultPolicy string
    The default policy on incoming traffic. Possible values are: accept or drop.
    InboundRules []GetInstanceSecurityGroupInboundRule
    A list of inbound rule to add to the security group. (Structure is documented below.)
    OrganizationId string
    The ID of the organization the security group is associated with.
    OutboundDefaultPolicy string
    The default policy on outgoing traffic. Possible values are: accept or drop.
    OutboundRules []GetInstanceSecurityGroupOutboundRule
    A list of outbound rule to add to the security group. (Structure is documented below.)
    Stateful bool
    Tags []string
    Name string
    ProjectId string
    SecurityGroupId string
    Zone string
    description String
    enableDefaultSecurity Boolean
    externalRules Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    inboundDefaultPolicy String
    The default policy on incoming traffic. Possible values are: accept or drop.
    inboundRules List<GetInstanceSecurityGroupInboundRule>
    A list of inbound rule to add to the security group. (Structure is documented below.)
    organizationId String
    The ID of the organization the security group is associated with.
    outboundDefaultPolicy String
    The default policy on outgoing traffic. Possible values are: accept or drop.
    outboundRules List<GetInstanceSecurityGroupOutboundRule>
    A list of outbound rule to add to the security group. (Structure is documented below.)
    stateful Boolean
    tags List<String>
    name String
    projectId String
    securityGroupId String
    zone String
    description string
    enableDefaultSecurity boolean
    externalRules boolean
    id string
    The provider-assigned unique ID for this managed resource.
    inboundDefaultPolicy string
    The default policy on incoming traffic. Possible values are: accept or drop.
    inboundRules GetInstanceSecurityGroupInboundRule[]
    A list of inbound rule to add to the security group. (Structure is documented below.)
    organizationId string
    The ID of the organization the security group is associated with.
    outboundDefaultPolicy string
    The default policy on outgoing traffic. Possible values are: accept or drop.
    outboundRules GetInstanceSecurityGroupOutboundRule[]
    A list of outbound rule to add to the security group. (Structure is documented below.)
    stateful boolean
    tags string[]
    name string
    projectId string
    securityGroupId string
    zone string
    description str
    enable_default_security bool
    external_rules bool
    id str
    The provider-assigned unique ID for this managed resource.
    inbound_default_policy str
    The default policy on incoming traffic. Possible values are: accept or drop.
    inbound_rules Sequence[GetInstanceSecurityGroupInboundRule]
    A list of inbound rule to add to the security group. (Structure is documented below.)
    organization_id str
    The ID of the organization the security group is associated with.
    outbound_default_policy str
    The default policy on outgoing traffic. Possible values are: accept or drop.
    outbound_rules Sequence[GetInstanceSecurityGroupOutboundRule]
    A list of outbound rule to add to the security group. (Structure is documented below.)
    stateful bool
    tags Sequence[str]
    name str
    project_id str
    security_group_id str
    zone str
    description String
    enableDefaultSecurity Boolean
    externalRules Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    inboundDefaultPolicy String
    The default policy on incoming traffic. Possible values are: accept or drop.
    inboundRules List<Property Map>
    A list of inbound rule to add to the security group. (Structure is documented below.)
    organizationId String
    The ID of the organization the security group is associated with.
    outboundDefaultPolicy String
    The default policy on outgoing traffic. Possible values are: accept or drop.
    outboundRules List<Property Map>
    A list of outbound rule to add to the security group. (Structure is documented below.)
    stateful Boolean
    tags List<String>
    name String
    projectId String
    securityGroupId String
    zone String

    Supporting Types

    GetInstanceSecurityGroupInboundRule

    Action string
    The action to take when rule match. Possible values are: accept or drop.
    Ip string
    The ip this rule apply to.
    IpRange string
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    Port int
    The port this rule apply to. If no port is specified, rule will apply to all port.
    PortRange string
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    Protocol string
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    Action string
    The action to take when rule match. Possible values are: accept or drop.
    Ip string
    The ip this rule apply to.
    IpRange string
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    Port int
    The port this rule apply to. If no port is specified, rule will apply to all port.
    PortRange string
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    Protocol string
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    action String
    The action to take when rule match. Possible values are: accept or drop.
    ip String
    The ip this rule apply to.
    ipRange String
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    port Integer
    The port this rule apply to. If no port is specified, rule will apply to all port.
    portRange String
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    protocol String
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    action string
    The action to take when rule match. Possible values are: accept or drop.
    ip string
    The ip this rule apply to.
    ipRange string
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    port number
    The port this rule apply to. If no port is specified, rule will apply to all port.
    portRange string
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    protocol string
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    action str
    The action to take when rule match. Possible values are: accept or drop.
    ip str
    The ip this rule apply to.
    ip_range str
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    port int
    The port this rule apply to. If no port is specified, rule will apply to all port.
    port_range str
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    protocol str
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    action String
    The action to take when rule match. Possible values are: accept or drop.
    ip String
    The ip this rule apply to.
    ipRange String
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    port Number
    The port this rule apply to. If no port is specified, rule will apply to all port.
    portRange String
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    protocol String
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.

    GetInstanceSecurityGroupOutboundRule

    Action string
    The action to take when rule match. Possible values are: accept or drop.
    Ip string
    The ip this rule apply to.
    IpRange string
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    Port int
    The port this rule apply to. If no port is specified, rule will apply to all port.
    PortRange string
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    Protocol string
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    Action string
    The action to take when rule match. Possible values are: accept or drop.
    Ip string
    The ip this rule apply to.
    IpRange string
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    Port int
    The port this rule apply to. If no port is specified, rule will apply to all port.
    PortRange string
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    Protocol string
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    action String
    The action to take when rule match. Possible values are: accept or drop.
    ip String
    The ip this rule apply to.
    ipRange String
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    port Integer
    The port this rule apply to. If no port is specified, rule will apply to all port.
    portRange String
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    protocol String
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    action string
    The action to take when rule match. Possible values are: accept or drop.
    ip string
    The ip this rule apply to.
    ipRange string
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    port number
    The port this rule apply to. If no port is specified, rule will apply to all port.
    portRange string
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    protocol string
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    action str
    The action to take when rule match. Possible values are: accept or drop.
    ip str
    The ip this rule apply to.
    ip_range str
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    port int
    The port this rule apply to. If no port is specified, rule will apply to all port.
    port_range str
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    protocol str
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.
    action String
    The action to take when rule match. Possible values are: accept or drop.
    ip String
    The ip this rule apply to.
    ipRange String
    The ip range (e.g 192.168.1.0/24) this rule apply to.
    port Number
    The port this rule apply to. If no port is specified, rule will apply to all port.
    portRange String
    The port range (e.g 22-23) this rule applies to. If no port nor port_range are specified, rule will apply to all port. Only one of port and port_range should be specified.
    protocol String
    The protocol this rule apply to. Possible values are: TCP, UDP, ICMP or ANY.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse