1. Packages
  2. AWS
  3. API Docs
  4. iot
  5. getEndpoint
AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi

aws.iot.getEndpoint

Start a Neo task
Explain and create an aws.iot.getEndpoint resource
aws logo
AWS v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi

    Returns a unique endpoint specific to the AWS account making the call.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as kubernetes from "@pulumi/kubernetes";
    
    const example = aws.iot.getEndpoint({});
    const agent = new kubernetes.index.Pod("agent", {
        metadata: [{
            name: "my-device",
        }],
        spec: [{
            container: [{
                image: "gcr.io/my-project/image-name",
                name: "image-name",
                env: [{
                    name: "IOT_ENDPOINT",
                    value: example.endpointAddress,
                }],
            }],
        }],
    });
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_kubernetes as kubernetes
    
    example = aws.iot.get_endpoint()
    agent = kubernetes.index.Pod("agent",
        metadata=[{
            name: my-device,
        }],
        spec=[{
            container: [{
                image: gcr.io/my-project/image-name,
                name: image-name,
                env: [{
                    name: IOT_ENDPOINT,
                    value: example.endpoint_address,
                }],
            }],
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iot"
    	"github.com/pulumi/pulumi-kubernetes/sdk/go/kubernetes"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := iot.GetEndpoint(ctx, &iot.GetEndpointArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = kubernetes.NewPod(ctx, "agent", &kubernetes.PodArgs{
    			Metadata: []map[string]interface{}{
    				map[string]interface{}{
    					"name": "my-device",
    				},
    			},
    			Spec: []map[string]interface{}{
    				map[string]interface{}{
    					"container": []map[string]interface{}{
    						map[string]interface{}{
    							"image": "gcr.io/my-project/image-name",
    							"name":  "image-name",
    							"env": []map[string]interface{}{
    								map[string]interface{}{
    									"name":  "IOT_ENDPOINT",
    									"value": example.EndpointAddress,
    								},
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Kubernetes = Pulumi.Kubernetes;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Iot.GetEndpoint.Invoke();
    
        var agent = new Kubernetes.Index.Pod("agent", new()
        {
            Metadata = new[]
            {
                
                {
                    { "name", "my-device" },
                },
            },
            Spec = new[]
            {
                
                {
                    { "container", new[]
                    {
                        
                        {
                            { "image", "gcr.io/my-project/image-name" },
                            { "name", "image-name" },
                            { "env", new[]
                            {
                                
                                {
                                    { "name", "IOT_ENDPOINT" },
                                    { "value", example.Apply(getEndpointResult => getEndpointResult.EndpointAddress) },
                                },
                            } },
                        },
                    } },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.iot.IotFunctions;
    import com.pulumi.aws.iot.inputs.GetEndpointArgs;
    import com.pulumi.kubernetes.Pod;
    import com.pulumi.kubernetes.PodArgs;
    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 example = IotFunctions.getEndpoint(GetEndpointArgs.builder()
                .build());
    
            var agent = new Pod("agent", PodArgs.builder()
                .metadata(List.of(Map.of("name", "my-device")))
                .spec(List.of(Map.of("container", List.of(Map.ofEntries(
                    Map.entry("image", "gcr.io/my-project/image-name"),
                    Map.entry("name", "image-name"),
                    Map.entry("env", List.of(Map.ofEntries(
                        Map.entry("name", "IOT_ENDPOINT"),
                        Map.entry("value", example.endpointAddress())
                    )))
                )))))
                .build());
    
        }
    }
    
    resources:
      agent:
        type: kubernetes:Pod
        properties:
          metadata:
            - name: my-device
          spec:
            - container:
                - image: gcr.io/my-project/image-name
                  name: image-name
                  env:
                    - name: IOT_ENDPOINT
                      value: ${example.endpointAddress}
    variables:
      example:
        fn::invoke:
          function: aws:iot:getEndpoint
          arguments: {}
    

    Using getEndpoint

    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 getEndpoint(args: GetEndpointArgs, opts?: InvokeOptions): Promise<GetEndpointResult>
    function getEndpointOutput(args: GetEndpointOutputArgs, opts?: InvokeOptions): Output<GetEndpointResult>
    def get_endpoint(endpoint_type: Optional[str] = None,
                     region: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetEndpointResult
    def get_endpoint_output(endpoint_type: Optional[pulumi.Input[str]] = None,
                     region: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetEndpointResult]
    func GetEndpoint(ctx *Context, args *GetEndpointArgs, opts ...InvokeOption) (*GetEndpointResult, error)
    func GetEndpointOutput(ctx *Context, args *GetEndpointOutputArgs, opts ...InvokeOption) GetEndpointResultOutput

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

    public static class GetEndpoint 
    {
        public static Task<GetEndpointResult> InvokeAsync(GetEndpointArgs args, InvokeOptions? opts = null)
        public static Output<GetEndpointResult> Invoke(GetEndpointInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEndpointResult> getEndpoint(GetEndpointArgs args, InvokeOptions options)
    public static Output<GetEndpointResult> getEndpoint(GetEndpointArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:iot/getEndpoint:getEndpoint
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EndpointType string
    Endpoint type. Valid values: iot:CredentialProvider, iot:Data, iot:Data-ATS, iot:Jobs.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    EndpointType string
    Endpoint type. Valid values: iot:CredentialProvider, iot:Data, iot:Data-ATS, iot:Jobs.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    endpointType String
    Endpoint type. Valid values: iot:CredentialProvider, iot:Data, iot:Data-ATS, iot:Jobs.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    endpointType string
    Endpoint type. Valid values: iot:CredentialProvider, iot:Data, iot:Data-ATS, iot:Jobs.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    endpoint_type str
    Endpoint type. Valid values: iot:CredentialProvider, iot:Data, iot:Data-ATS, iot:Jobs.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    endpointType String
    Endpoint type. Valid values: iot:CredentialProvider, iot:Data, iot:Data-ATS, iot:Jobs.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.

    getEndpoint Result

    The following output properties are available:

    EndpointAddress string
    Endpoint based on endpoint_type:

    • No endpoint_type: Either iot:Data or iot:Data-ATS depending on region
    • iot:CredentialsProvider: IDENTIFIER.credentials.iot.REGION.amazonaws.com
    • iot:Data: IDENTIFIER.iot.REGION.amazonaws.com
    • iot:Data-ATS: IDENTIFIER-ats.iot.REGION.amazonaws.com
    • iot:Jobs: IDENTIFIER.jobs.iot.REGION.amazonaws.com
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    EndpointType string
    EndpointAddress string
    Endpoint based on endpoint_type:

    • No endpoint_type: Either iot:Data or iot:Data-ATS depending on region
    • iot:CredentialsProvider: IDENTIFIER.credentials.iot.REGION.amazonaws.com
    • iot:Data: IDENTIFIER.iot.REGION.amazonaws.com
    • iot:Data-ATS: IDENTIFIER-ats.iot.REGION.amazonaws.com
    • iot:Jobs: IDENTIFIER.jobs.iot.REGION.amazonaws.com
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    EndpointType string
    endpointAddress String
    Endpoint based on endpoint_type:

    • No endpoint_type: Either iot:Data or iot:Data-ATS depending on region
    • iot:CredentialsProvider: IDENTIFIER.credentials.iot.REGION.amazonaws.com
    • iot:Data: IDENTIFIER.iot.REGION.amazonaws.com
    • iot:Data-ATS: IDENTIFIER-ats.iot.REGION.amazonaws.com
    • iot:Jobs: IDENTIFIER.jobs.iot.REGION.amazonaws.com
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    endpointType String
    endpointAddress string
    Endpoint based on endpoint_type:

    • No endpoint_type: Either iot:Data or iot:Data-ATS depending on region
    • iot:CredentialsProvider: IDENTIFIER.credentials.iot.REGION.amazonaws.com
    • iot:Data: IDENTIFIER.iot.REGION.amazonaws.com
    • iot:Data-ATS: IDENTIFIER-ats.iot.REGION.amazonaws.com
    • iot:Jobs: IDENTIFIER.jobs.iot.REGION.amazonaws.com
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    endpointType string
    endpoint_address str
    Endpoint based on endpoint_type:

    • No endpoint_type: Either iot:Data or iot:Data-ATS depending on region
    • iot:CredentialsProvider: IDENTIFIER.credentials.iot.REGION.amazonaws.com
    • iot:Data: IDENTIFIER.iot.REGION.amazonaws.com
    • iot:Data-ATS: IDENTIFIER-ats.iot.REGION.amazonaws.com
    • iot:Jobs: IDENTIFIER.jobs.iot.REGION.amazonaws.com
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    endpoint_type str
    endpointAddress String
    Endpoint based on endpoint_type:

    • No endpoint_type: Either iot:Data or iot:Data-ATS depending on region
    • iot:CredentialsProvider: IDENTIFIER.credentials.iot.REGION.amazonaws.com
    • iot:Data: IDENTIFIER.iot.REGION.amazonaws.com
    • iot:Data-ATS: IDENTIFIER-ats.iot.REGION.amazonaws.com
    • iot:Jobs: IDENTIFIER.jobs.iot.REGION.amazonaws.com
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    endpointType 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 v7.11.0 published on Wednesday, Nov 5, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate