1. Packages
  2. AWS
  3. API Docs
  4. globalaccelerator
  5. getAccelerator
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.globalaccelerator.getAccelerator

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Provides information about a Global Accelerator accelerator.

    Example Usage

    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,
    });
    
    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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    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 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());
    
        }
    }
    
    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,
                        id: Optional[str] = None,
                        name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetAcceleratorResult
    def get_accelerator_output(arn: Optional[pulumi.Input[str]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        name: Optional[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.
    Id string
    Name string

    Unique name of the Global Accelerator.

    NOTE: When both arn and name are specified, arn takes precedence.

    Arn string
    Full ARN of the Global Accelerator.
    Id string
    Name string

    Unique name of the Global Accelerator.

    NOTE: When both arn and name are specified, arn takes precedence.

    arn String
    Full ARN of the Global Accelerator.
    id String
    name String

    Unique name of the Global Accelerator.

    NOTE: When both arn and name are specified, arn takes precedence.

    arn string
    Full ARN of the Global Accelerator.
    id string
    name string

    Unique name of the Global Accelerator.

    NOTE: When both arn and name are specified, arn takes precedence.

    arn str
    Full ARN of the Global Accelerator.
    id str
    name str

    Unique name of the Global Accelerator.

    NOTE: When both arn and name are specified, arn takes precedence.

    arn String
    Full ARN of the Global Accelerator.
    id String
    name String

    Unique name of the Global Accelerator.

    NOTE: When both arn and name are specified, arn takes precedence.

    getAccelerator Result

    The following output properties are available:

    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
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi