1. Packages
  2. Outscale Provider
  3. API Docs
  4. getApiAccessRules
outscale 1.0.1 published on Thursday, Mar 13, 2025 by outscale

outscale.getApiAccessRules

Explore with Pulumi AI

outscale logo
outscale 1.0.1 published on Thursday, Mar 13, 2025 by outscale

    Provides information about API access rules.

    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 apiAccessRules01 = outscale.getApiAccessRules({
        filters: [
            {
                name: "ca_ids",
                values: [
                    "ca-12345678",
                    "ca-87654321",
                ],
            },
            {
                name: "ip_ranges",
                values: ["192.0.2.0/16"],
            },
        ],
    });
    
    import pulumi
    import pulumi_outscale as outscale
    
    api_access_rules01 = outscale.get_api_access_rules(filters=[
        {
            "name": "ca_ids",
            "values": [
                "ca-12345678",
                "ca-87654321",
            ],
        },
        {
            "name": "ip_ranges",
            "values": ["192.0.2.0/16"],
        },
    ])
    
    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.GetApiAccessRules(ctx, &outscale.GetApiAccessRulesArgs{
    			Filters: []outscale.GetApiAccessRulesFilter{
    				{
    					Name: "ca_ids",
    					Values: []string{
    						"ca-12345678",
    						"ca-87654321",
    					},
    				},
    				{
    					Name: "ip_ranges",
    					Values: []string{
    						"192.0.2.0/16",
    					},
    				},
    			},
    		}, 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 apiAccessRules01 = Outscale.GetApiAccessRules.Invoke(new()
        {
            Filters = new[]
            {
                new Outscale.Inputs.GetApiAccessRulesFilterInputArgs
                {
                    Name = "ca_ids",
                    Values = new[]
                    {
                        "ca-12345678",
                        "ca-87654321",
                    },
                },
                new Outscale.Inputs.GetApiAccessRulesFilterInputArgs
                {
                    Name = "ip_ranges",
                    Values = new[]
                    {
                        "192.0.2.0/16",
                    },
                },
            },
        });
    
    });
    
    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.GetApiAccessRulesArgs;
    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 apiAccessRules01 = OutscaleFunctions.getApiAccessRules(GetApiAccessRulesArgs.builder()
                .filters(            
                    GetApiAccessRulesFilterArgs.builder()
                        .name("ca_ids")
                        .values(                    
                            "ca-12345678",
                            "ca-87654321")
                        .build(),
                    GetApiAccessRulesFilterArgs.builder()
                        .name("ip_ranges")
                        .values("192.0.2.0/16")
                        .build())
                .build());
    
        }
    }
    
    variables:
      apiAccessRules01:
        fn::invoke:
          function: outscale:getApiAccessRules
          arguments:
            filters:
              - name: ca_ids
                values:
                  - ca-12345678
                  - ca-87654321
              - name: ip_ranges
                values:
                  - 192.0.2.0/16
    

    Using getApiAccessRules

    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 getApiAccessRules(args: GetApiAccessRulesArgs, opts?: InvokeOptions): Promise<GetApiAccessRulesResult>
    function getApiAccessRulesOutput(args: GetApiAccessRulesOutputArgs, opts?: InvokeOptions): Output<GetApiAccessRulesResult>
    def get_api_access_rules(filters: Optional[Sequence[GetApiAccessRulesFilter]] = None,
                             id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetApiAccessRulesResult
    def get_api_access_rules_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetApiAccessRulesFilterArgs]]]] = None,
                             id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetApiAccessRulesResult]
    func GetApiAccessRules(ctx *Context, args *GetApiAccessRulesArgs, opts ...InvokeOption) (*GetApiAccessRulesResult, error)
    func GetApiAccessRulesOutput(ctx *Context, args *GetApiAccessRulesOutputArgs, opts ...InvokeOption) GetApiAccessRulesResultOutput

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

    public static class GetApiAccessRules 
    {
        public static Task<GetApiAccessRulesResult> InvokeAsync(GetApiAccessRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetApiAccessRulesResult> Invoke(GetApiAccessRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApiAccessRulesResult> getApiAccessRules(GetApiAccessRulesArgs args, InvokeOptions options)
    public static Output<GetApiAccessRulesResult> getApiAccessRules(GetApiAccessRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: outscale:index/getApiAccessRules:getApiAccessRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Filters List<GetApiAccessRulesFilter>
    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
    Filters []GetApiAccessRulesFilter
    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
    filters List<GetApiAccessRulesFilter>
    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
    filters GetApiAccessRulesFilter[]
    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
    filters Sequence[GetApiAccessRulesFilter]
    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
    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

    getApiAccessRules Result

    The following output properties are available:

    Supporting Types

    GetApiAccessRulesApiAccessRule

    ApiAccessRuleId string
    The ID of the API access rule.
    CaIds List<string>
    One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
    Cns List<string>
    One or more Client Certificate Common Names (CNs).
    Description string
    The description of the API access rule.
    IpRanges List<string>
    One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
    ApiAccessRuleId string
    The ID of the API access rule.
    CaIds []string
    One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
    Cns []string
    One or more Client Certificate Common Names (CNs).
    Description string
    The description of the API access rule.
    IpRanges []string
    One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
    apiAccessRuleId String
    The ID of the API access rule.
    caIds List<String>
    One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
    cns List<String>
    One or more Client Certificate Common Names (CNs).
    description String
    The description of the API access rule.
    ipRanges List<String>
    One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
    apiAccessRuleId string
    The ID of the API access rule.
    caIds string[]
    One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
    cns string[]
    One or more Client Certificate Common Names (CNs).
    description string
    The description of the API access rule.
    ipRanges string[]
    One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
    api_access_rule_id str
    The ID of the API access rule.
    ca_ids Sequence[str]
    One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
    cns Sequence[str]
    One or more Client Certificate Common Names (CNs).
    description str
    The description of the API access rule.
    ip_ranges Sequence[str]
    One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
    apiAccessRuleId String
    The ID of the API access rule.
    caIds List<String>
    One or more IDs of Client Certificate Authorities (CAs) used for the API access rule.
    cns List<String>
    One or more Client Certificate Common Names (CNs).
    description String
    The description of the API access rule.
    ipRanges List<String>
    One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).

    GetApiAccessRulesFilter

    Name string
    Values List<string>
    Name string
    Values []string
    name String
    values List<String>
    name string
    values string[]
    name str
    values Sequence[str]
    name String
    values List<String>

    Package Details

    Repository
    outscale outscale/terraform-provider-outscale
    License
    Notes
    This Pulumi package is based on the outscale Terraform Provider.
    outscale logo
    outscale 1.0.1 published on Thursday, Mar 13, 2025 by outscale