1. Packages
  2. AWS
  3. API Docs
  4. account
  5. getPrimaryContact
AWS v6.82.2 published on Thursday, Jun 12, 2025 by Pulumi

aws.account.getPrimaryContact

Explore with Pulumi AI

aws logo
AWS v6.82.2 published on Thursday, Jun 12, 2025 by Pulumi

    Data source for the primary contact information associated with an AWS Account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.account.getPrimaryContact({});
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.account.get_primary_contact()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/account"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := account.LookupPrimaryContact(ctx, &account.LookupPrimaryContactArgs{}, 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 test = Aws.Account.GetPrimaryContact.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.account.AccountFunctions;
    import com.pulumi.aws.account.inputs.GetPrimaryContactArgs;
    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 test = AccountFunctions.getPrimaryContact(GetPrimaryContactArgs.builder()
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: aws:account:getPrimaryContact
          arguments: {}
    

    Using getPrimaryContact

    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 getPrimaryContact(args: GetPrimaryContactArgs, opts?: InvokeOptions): Promise<GetPrimaryContactResult>
    function getPrimaryContactOutput(args: GetPrimaryContactOutputArgs, opts?: InvokeOptions): Output<GetPrimaryContactResult>
    def get_primary_contact(account_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPrimaryContactResult
    def get_primary_contact_output(account_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPrimaryContactResult]
    func LookupPrimaryContact(ctx *Context, args *LookupPrimaryContactArgs, opts ...InvokeOption) (*LookupPrimaryContactResult, error)
    func LookupPrimaryContactOutput(ctx *Context, args *LookupPrimaryContactOutputArgs, opts ...InvokeOption) LookupPrimaryContactResultOutput

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

    public static class GetPrimaryContact 
    {
        public static Task<GetPrimaryContactResult> InvokeAsync(GetPrimaryContactArgs args, InvokeOptions? opts = null)
        public static Output<GetPrimaryContactResult> Invoke(GetPrimaryContactInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPrimaryContactResult> getPrimaryContact(GetPrimaryContactArgs args, InvokeOptions options)
    public static Output<GetPrimaryContactResult> getPrimaryContact(GetPrimaryContactArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:account/getPrimaryContact:getPrimaryContact
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    AccountId string
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    accountId String
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    accountId string
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    account_id str
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    accountId String
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.

    getPrimaryContact Result

    The following output properties are available:

    AccountId string
    AddressLine1 string
    The first line of the primary contact address.
    AddressLine2 string
    The second line of the primary contact address.
    AddressLine3 string
    The third line of the primary contact address.
    City string
    The city of the primary contact address.
    CompanyName string
    The name of the company associated with the primary contact information.
    CountryCode string
    The ISO-3166 two-letter country code for the primary contact address.
    DistrictOrCounty string
    The district or county of the primary contact address.
    FullName string
    The full name of the primary contact address.
    Id string
    The provider-assigned unique ID for this managed resource.
    PhoneNumber string
    The phone number of the primary contact information.
    PostalCode string
    The postal code of the primary contact address.
    StateOrRegion string
    The state or region of the primary contact address.
    WebsiteUrl string
    The URL of the website associated with the primary contact information.
    AccountId string
    AddressLine1 string
    The first line of the primary contact address.
    AddressLine2 string
    The second line of the primary contact address.
    AddressLine3 string
    The third line of the primary contact address.
    City string
    The city of the primary contact address.
    CompanyName string
    The name of the company associated with the primary contact information.
    CountryCode string
    The ISO-3166 two-letter country code for the primary contact address.
    DistrictOrCounty string
    The district or county of the primary contact address.
    FullName string
    The full name of the primary contact address.
    Id string
    The provider-assigned unique ID for this managed resource.
    PhoneNumber string
    The phone number of the primary contact information.
    PostalCode string
    The postal code of the primary contact address.
    StateOrRegion string
    The state or region of the primary contact address.
    WebsiteUrl string
    The URL of the website associated with the primary contact information.
    accountId String
    addressLine1 String
    The first line of the primary contact address.
    addressLine2 String
    The second line of the primary contact address.
    addressLine3 String
    The third line of the primary contact address.
    city String
    The city of the primary contact address.
    companyName String
    The name of the company associated with the primary contact information.
    countryCode String
    The ISO-3166 two-letter country code for the primary contact address.
    districtOrCounty String
    The district or county of the primary contact address.
    fullName String
    The full name of the primary contact address.
    id String
    The provider-assigned unique ID for this managed resource.
    phoneNumber String
    The phone number of the primary contact information.
    postalCode String
    The postal code of the primary contact address.
    stateOrRegion String
    The state or region of the primary contact address.
    websiteUrl String
    The URL of the website associated with the primary contact information.
    accountId string
    addressLine1 string
    The first line of the primary contact address.
    addressLine2 string
    The second line of the primary contact address.
    addressLine3 string
    The third line of the primary contact address.
    city string
    The city of the primary contact address.
    companyName string
    The name of the company associated with the primary contact information.
    countryCode string
    The ISO-3166 two-letter country code for the primary contact address.
    districtOrCounty string
    The district or county of the primary contact address.
    fullName string
    The full name of the primary contact address.
    id string
    The provider-assigned unique ID for this managed resource.
    phoneNumber string
    The phone number of the primary contact information.
    postalCode string
    The postal code of the primary contact address.
    stateOrRegion string
    The state or region of the primary contact address.
    websiteUrl string
    The URL of the website associated with the primary contact information.
    account_id str
    address_line1 str
    The first line of the primary contact address.
    address_line2 str
    The second line of the primary contact address.
    address_line3 str
    The third line of the primary contact address.
    city str
    The city of the primary contact address.
    company_name str
    The name of the company associated with the primary contact information.
    country_code str
    The ISO-3166 two-letter country code for the primary contact address.
    district_or_county str
    The district or county of the primary contact address.
    full_name str
    The full name of the primary contact address.
    id str
    The provider-assigned unique ID for this managed resource.
    phone_number str
    The phone number of the primary contact information.
    postal_code str
    The postal code of the primary contact address.
    state_or_region str
    The state or region of the primary contact address.
    website_url str
    The URL of the website associated with the primary contact information.
    accountId String
    addressLine1 String
    The first line of the primary contact address.
    addressLine2 String
    The second line of the primary contact address.
    addressLine3 String
    The third line of the primary contact address.
    city String
    The city of the primary contact address.
    companyName String
    The name of the company associated with the primary contact information.
    countryCode String
    The ISO-3166 two-letter country code for the primary contact address.
    districtOrCounty String
    The district or county of the primary contact address.
    fullName String
    The full name of the primary contact address.
    id String
    The provider-assigned unique ID for this managed resource.
    phoneNumber String
    The phone number of the primary contact information.
    postalCode String
    The postal code of the primary contact address.
    stateOrRegion String
    The state or region of the primary contact address.
    websiteUrl String
    The URL of the website associated with the primary contact information.

    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.82.2 published on Thursday, Jun 12, 2025 by Pulumi