getIamStates

Use akamai.getIamStates to list US states or Canadian provinces. If country=USA you may enter a value of TBD if you don’t know a user’s state. Administrators use this data source to set a user’s state.

Attributes reference

These attributes are returned:

  • states — A list of states.

API Reference

Example Usage

Basic usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var states = Output.Create(Akamai.GetIamStates.InvokeAsync(new Akamai.GetIamStatesArgs
        {
            Country = "canada",
        }));
        this.SupportedStates = states;
    }

    [Output("supportedStates")]
    public Output<string> SupportedStates { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v3/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		states, err := akamai.GetIamStates(ctx, &GetIamStatesArgs{
			Country: "canada",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("supportedStates", states)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akamai.AkamaiFunctions;
import com.pulumi.akamai.inputs.GetIamStatesArgs;
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 states = AkamaiFunctions.getIamStates(GetIamStatesArgs.builder()
            .country("canada")
            .build());

        ctx.export("supportedStates", states.applyValue(getIamStatesResult -> getIamStatesResult));
    }
}
import pulumi
import pulumi_akamai as akamai

states = akamai.get_iam_states(country="canada")
pulumi.export("supportedStates", states)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const states = akamai.getIamStates({
    country: "canada",
});
export const supportedStates = states;
variables:
  states:
    Fn::Invoke:
      Function: akamai:getIamStates
      Arguments:
        country: canada
outputs:
  supportedStates: ${states}

Using getIamStates

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 getIamStates(args: GetIamStatesArgs, opts?: InvokeOptions): Promise<GetIamStatesResult>
function getIamStatesOutput(args: GetIamStatesOutputArgs, opts?: InvokeOptions): Output<GetIamStatesResult>
def get_iam_states(country: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetIamStatesResult
def get_iam_states_output(country: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetIamStatesResult]
func GetIamStates(ctx *Context, args *GetIamStatesArgs, opts ...InvokeOption) (*GetIamStatesResult, error)
func GetIamStatesOutput(ctx *Context, args *GetIamStatesOutputArgs, opts ...InvokeOption) GetIamStatesResultOutput

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

public static class GetIamStates 
{
    public static Task<GetIamStatesResult> InvokeAsync(GetIamStatesArgs args, InvokeOptions? opts = null)
    public static Output<GetIamStatesResult> Invoke(GetIamStatesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIamStatesResult> getIamStates(GetIamStatesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getIamStates:getIamStates
  arguments:
    # arguments dictionary

The following arguments are supported:

Country string

— (required, string) Specifies USA or Canada.

Country string

— (required, string) Specifies USA or Canada.

country String

— (required, string) Specifies USA or Canada.

country string

— (required, string) Specifies USA or Canada.

country str

— (required, string) Specifies USA or Canada.

country String

— (required, string) Specifies USA or Canada.

getIamStates Result

The following output properties are available:

Country string
Id string

The provider-assigned unique ID for this managed resource.

States List<string>
Country string
Id string

The provider-assigned unique ID for this managed resource.

States []string
country String
id String

The provider-assigned unique ID for this managed resource.

states List<String>
country string
id string

The provider-assigned unique ID for this managed resource.

states string[]
country str
id str

The provider-assigned unique ID for this managed resource.

states Sequence[str]
country String
id String

The provider-assigned unique ID for this managed resource.

states List<String>

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.