AWS Classic

v5.16.0 published on Saturday, Sep 24, 2022 by Pulumi

getAccelerator

Provides information about a Global Accelerator accelerator.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var acceleratorArn = config.Get("acceleratorArn") ?? "";
    var acceleratorName = config.Get("acceleratorName") ?? "";
    var example = Aws.GlobalAccelerator.GetAccelerator.Invoke(new()
    {
        Arn = acceleratorArn,
        Name = acceleratorName,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/globalaccelerator"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		acceleratorArn := ""
		if param := cfg.Get("acceleratorArn"); param != "" {
			acceleratorArn = param
		}
		acceleratorName := ""
		if param := cfg.Get("acceleratorName"); param != "" {
			acceleratorName = param
		}
		_, err := globalaccelerator.LookupAccelerator(ctx, &globalaccelerator.LookupAcceleratorArgs{
			Arn:  pulumi.StringRef(acceleratorArn),
			Name: pulumi.StringRef(acceleratorName),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.globalaccelerator.GlobalacceleratorFunctions;
import com.pulumi.aws.globalaccelerator.inputs.GetAcceleratorArgs;
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 config = ctx.config();
        final var acceleratorArn = config.get("acceleratorArn").orElse("");
        final var acceleratorName = config.get("acceleratorName").orElse("");
        final var example = GlobalacceleratorFunctions.getAccelerator(GetAcceleratorArgs.builder()
            .arn(acceleratorArn)
            .name(acceleratorName)
            .build());

    }
}
import pulumi
import pulumi_aws as aws

config = pulumi.Config()
accelerator_arn = config.get("acceleratorArn")
if accelerator_arn is None:
    accelerator_arn = ""
accelerator_name = config.get("acceleratorName")
if accelerator_name is None:
    accelerator_name = ""
example = aws.globalaccelerator.get_accelerator(arn=accelerator_arn,
    name=accelerator_name)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const config = new pulumi.Config();
const acceleratorArn = config.get("acceleratorArn") || "";
const acceleratorName = config.get("acceleratorName") || "";
const example = aws.globalaccelerator.getAccelerator({
    arn: acceleratorArn,
    name: acceleratorName,
});
configuration:
  acceleratorArn:
    type: string
    default:
  acceleratorName:
    type: string
    default:
variables:
  example:
    Fn::Invoke:
      Function: aws:globalaccelerator:getAccelerator
      Arguments:
        arn: ${acceleratorArn}
        name: ${acceleratorName}

Using getAccelerator

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 getAccelerator(args: GetAcceleratorArgs, opts?: InvokeOptions): Promise<GetAcceleratorResult>
function getAcceleratorOutput(args: GetAcceleratorOutputArgs, opts?: InvokeOptions): Output<GetAcceleratorResult>
def get_accelerator(arn: Optional[str] = None,
                    name: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetAcceleratorResult
def get_accelerator_output(arn: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetAcceleratorResult]
func LookupAccelerator(ctx *Context, args *LookupAcceleratorArgs, opts ...InvokeOption) (*LookupAcceleratorResult, error)
func LookupAcceleratorOutput(ctx *Context, args *LookupAcceleratorOutputArgs, opts ...InvokeOption) LookupAcceleratorResultOutput

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

public static class GetAccelerator 
{
    public static Task<GetAcceleratorResult> InvokeAsync(GetAcceleratorArgs args, InvokeOptions? opts = null)
    public static Output<GetAcceleratorResult> Invoke(GetAcceleratorInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAcceleratorResult> getAccelerator(GetAcceleratorArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:globalaccelerator/getAccelerator:getAccelerator
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Arn string

Full ARN of the Global Accelerator.

Name string

Unique name of the Global Accelerator.

Tags Dictionary<string, string>
Arn string

Full ARN of the Global Accelerator.

Name string

Unique name of the Global Accelerator.

Tags map[string]string
arn String

Full ARN of the Global Accelerator.

name String

Unique name of the Global Accelerator.

tags Map<String,String>
arn string

Full ARN of the Global Accelerator.

name string

Unique name of the Global Accelerator.

tags {[key: string]: string}
arn str

Full ARN of the Global Accelerator.

name str

Unique name of the Global Accelerator.

tags Mapping[str, str]
arn String

Full ARN of the Global Accelerator.

name String

Unique name of the Global Accelerator.

tags Map<String>

getAccelerator Result

The following output properties are available:

Arn string
Attributes List<GetAcceleratorAttribute>
DnsName string
Enabled bool
HostedZoneId string
Id string

The provider-assigned unique ID for this managed resource.

IpAddressType string
IpSets List<GetAcceleratorIpSet>
Name string
Tags Dictionary<string, string>
Arn string
Attributes []GetAcceleratorAttribute
DnsName string
Enabled bool
HostedZoneId string
Id string

The provider-assigned unique ID for this managed resource.

IpAddressType string
IpSets []GetAcceleratorIpSet
Name string
Tags map[string]string
arn String
attributes List<GetAcceleratorAttribute>
dnsName String
enabled Boolean
hostedZoneId String
id String

The provider-assigned unique ID for this managed resource.

ipAddressType String
ipSets List<GetAcceleratorIpSet>
name String
tags Map<String,String>
arn string
attributes GetAcceleratorAttribute[]
dnsName string
enabled boolean
hostedZoneId string
id string

The provider-assigned unique ID for this managed resource.

ipAddressType string
ipSets GetAcceleratorIpSet[]
name string
tags {[key: string]: string}
arn str
attributes Sequence[GetAcceleratorAttribute]
dns_name str
enabled bool
hosted_zone_id str
id str

The provider-assigned unique ID for this managed resource.

ip_address_type str
ip_sets Sequence[GetAcceleratorIpSet]
name str
tags Mapping[str, str]
arn String
attributes List<Property Map>
dnsName String
enabled Boolean
hostedZoneId String
id String

The provider-assigned unique ID for this managed resource.

ipAddressType String
ipSets List<Property Map>
name String
tags Map<String>

Supporting Types

GetAcceleratorAttribute

GetAcceleratorIpSet

IpAddresses List<string>
IpFamily string
IpAddresses []string
IpFamily string
ipAddresses List<String>
ipFamily String
ipAddresses string[]
ipFamily string
ip_addresses Sequence[str]
ip_family str
ipAddresses List<String>
ipFamily String

Package Details

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

This Pulumi package is based on the aws Terraform Provider.