AWS v6.82.2 published on Thursday, Jun 12, 2025 by Pulumi
aws.account.getPrimaryContact
Explore with Pulumi AI
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:
- Account
Id string - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- Account
Id string - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- account
Id String - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- account
Id 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.
- account
Id 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:
- Account
Id string - Address
Line1 string - The first line of the primary contact address.
- Address
Line2 string - The second line of the primary contact address.
- Address
Line3 string - The third line of the primary contact address.
- City string
- The city of the primary contact address.
- Company
Name string - The name of the company associated with the primary contact information.
- Country
Code string - The ISO-3166 two-letter country code for the primary contact address.
- District
Or stringCounty - The district or county of the primary contact address.
- Full
Name string - The full name of the primary contact address.
- Id string
- The provider-assigned unique ID for this managed resource.
- Phone
Number string - The phone number of the primary contact information.
- Postal
Code string - The postal code of the primary contact address.
- State
Or stringRegion - The state or region of the primary contact address.
- Website
Url string - The URL of the website associated with the primary contact information.
- Account
Id string - Address
Line1 string - The first line of the primary contact address.
- Address
Line2 string - The second line of the primary contact address.
- Address
Line3 string - The third line of the primary contact address.
- City string
- The city of the primary contact address.
- Company
Name string - The name of the company associated with the primary contact information.
- Country
Code string - The ISO-3166 two-letter country code for the primary contact address.
- District
Or stringCounty - The district or county of the primary contact address.
- Full
Name string - The full name of the primary contact address.
- Id string
- The provider-assigned unique ID for this managed resource.
- Phone
Number string - The phone number of the primary contact information.
- Postal
Code string - The postal code of the primary contact address.
- State
Or stringRegion - The state or region of the primary contact address.
- Website
Url string - The URL of the website associated with the primary contact information.
- account
Id String - address
Line1 String - The first line of the primary contact address.
- address
Line2 String - The second line of the primary contact address.
- address
Line3 String - The third line of the primary contact address.
- city String
- The city of the primary contact address.
- company
Name String - The name of the company associated with the primary contact information.
- country
Code String - The ISO-3166 two-letter country code for the primary contact address.
- district
Or StringCounty - The district or county of the primary contact address.
- full
Name String - The full name of the primary contact address.
- id String
- The provider-assigned unique ID for this managed resource.
- phone
Number String - The phone number of the primary contact information.
- postal
Code String - The postal code of the primary contact address.
- state
Or StringRegion - The state or region of the primary contact address.
- website
Url String - The URL of the website associated with the primary contact information.
- account
Id string - address
Line1 string - The first line of the primary contact address.
- address
Line2 string - The second line of the primary contact address.
- address
Line3 string - The third line of the primary contact address.
- city string
- The city of the primary contact address.
- company
Name string - The name of the company associated with the primary contact information.
- country
Code string - The ISO-3166 two-letter country code for the primary contact address.
- district
Or stringCounty - The district or county of the primary contact address.
- full
Name string - The full name of the primary contact address.
- id string
- The provider-assigned unique ID for this managed resource.
- phone
Number string - The phone number of the primary contact information.
- postal
Code string - The postal code of the primary contact address.
- state
Or stringRegion - The state or region of the primary contact address.
- website
Url 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_ strcounty - 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_ strregion - The state or region of the primary contact address.
- website_
url str - The URL of the website associated with the primary contact information.
- account
Id String - address
Line1 String - The first line of the primary contact address.
- address
Line2 String - The second line of the primary contact address.
- address
Line3 String - The third line of the primary contact address.
- city String
- The city of the primary contact address.
- company
Name String - The name of the company associated with the primary contact information.
- country
Code String - The ISO-3166 two-letter country code for the primary contact address.
- district
Or StringCounty - The district or county of the primary contact address.
- full
Name String - The full name of the primary contact address.
- id String
- The provider-assigned unique ID for this managed resource.
- phone
Number String - The phone number of the primary contact information.
- postal
Code String - The postal code of the primary contact address.
- state
Or StringRegion - The state or region of the primary contact address.
- website
Url 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.