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

outscale.getApiAccessRule

Explore with Pulumi AI

Provides information about an API access rule.

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 apiAccessRule01 = outscale.getApiAccessRule({
    filters: [{
        name: "api_access_rule_ids",
        values: ["aar-12345678"],
    }],
});
Copy
import pulumi
import pulumi_outscale as outscale

api_access_rule01 = outscale.get_api_access_rule(filters=[{
    "name": "api_access_rule_ids",
    "values": ["aar-12345678"],
}])
Copy
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.LookupApiAccessRule(ctx, &outscale.LookupApiAccessRuleArgs{
			Filters: []outscale.GetApiAccessRuleFilter{
				{
					Name: "api_access_rule_ids",
					Values: []string{
						"aar-12345678",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var apiAccessRule01 = Outscale.GetApiAccessRule.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetApiAccessRuleFilterInputArgs
            {
                Name = "api_access_rule_ids",
                Values = new[]
                {
                    "aar-12345678",
                },
            },
        },
    });

});
Copy
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.GetApiAccessRuleArgs;
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 apiAccessRule01 = OutscaleFunctions.getApiAccessRule(GetApiAccessRuleArgs.builder()
            .filters(GetApiAccessRuleFilterArgs.builder()
                .name("api_access_rule_ids")
                .values("aar-12345678")
                .build())
            .build());

    }
}
Copy
variables:
  apiAccessRule01:
    fn::invoke:
      function: outscale:getApiAccessRule
      arguments:
        filters:
          - name: api_access_rule_ids
            values:
              - aar-12345678
Copy

Using getApiAccessRule

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 getApiAccessRule(args: GetApiAccessRuleArgs, opts?: InvokeOptions): Promise<GetApiAccessRuleResult>
function getApiAccessRuleOutput(args: GetApiAccessRuleOutputArgs, opts?: InvokeOptions): Output<GetApiAccessRuleResult>
Copy
def get_api_access_rule(filters: Optional[Sequence[GetApiAccessRuleFilter]] = None,
                        id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetApiAccessRuleResult
def get_api_access_rule_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetApiAccessRuleFilterArgs]]]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetApiAccessRuleResult]
Copy
func LookupApiAccessRule(ctx *Context, args *LookupApiAccessRuleArgs, opts ...InvokeOption) (*LookupApiAccessRuleResult, error)
func LookupApiAccessRuleOutput(ctx *Context, args *LookupApiAccessRuleOutputArgs, opts ...InvokeOption) LookupApiAccessRuleResultOutput
Copy

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

public static class GetApiAccessRule 
{
    public static Task<GetApiAccessRuleResult> InvokeAsync(GetApiAccessRuleArgs args, InvokeOptions? opts = null)
    public static Output<GetApiAccessRuleResult> Invoke(GetApiAccessRuleInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetApiAccessRuleResult> getApiAccessRule(GetApiAccessRuleArgs args, InvokeOptions options)
public static Output<GetApiAccessRuleResult> getApiAccessRule(GetApiAccessRuleArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: outscale:index/getApiAccessRule:getApiAccessRule
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetApiAccessRuleFilter>
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 []GetApiAccessRuleFilter
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<GetApiAccessRuleFilter>
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 GetApiAccessRuleFilter[]
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[GetApiAccessRuleFilter]
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

getApiAccessRule Result

The following output properties are available:

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.
Id string
IpRanges List<string>
One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
RequestId string
Filters List<GetApiAccessRuleFilter>
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.
Id string
IpRanges []string
One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
RequestId string
Filters []GetApiAccessRuleFilter
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.
id String
ipRanges List<String>
One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
requestId String
filters List<GetApiAccessRuleFilter>
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.
id string
ipRanges string[]
One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
requestId string
filters GetApiAccessRuleFilter[]
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.
id str
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).
request_id str
filters Sequence[GetApiAccessRuleFilter]
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.
id String
ipRanges List<String>
One or more IP ranges used for the API access rule, in CIDR notation (for example, 192.0.2.0/16).
requestId String
filters List<Property Map>

Supporting Types

GetApiAccessRuleFilter

Name This property is required. string
Values This property is required. List<string>
Name This property is required. string
Values This property is required. []string
name This property is required. String
values This property is required. List<String>
name This property is required. string
values This property is required. string[]
name This property is required. str
values This property is required. Sequence[str]
name This property is required. String
values This property is required. List<String>

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.