1. Packages
  2. AWS Classic
  3. API Docs
  4. account
  5. PrimaryContact

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi

aws.account.PrimaryContact

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi

    Manages the specified primary contact information associated with an AWS Account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = new aws.account.PrimaryContact("test", {
        addressLine1: "123 Any Street",
        city: "Seattle",
        companyName: "Example Corp, Inc.",
        countryCode: "US",
        districtOrCounty: "King",
        fullName: "My Name",
        phoneNumber: "+64211111111",
        postalCode: "98101",
        stateOrRegion: "WA",
        websiteUrl: "https://www.examplecorp.com",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.account.PrimaryContact("test",
        address_line1="123 Any Street",
        city="Seattle",
        company_name="Example Corp, Inc.",
        country_code="US",
        district_or_county="King",
        full_name="My Name",
        phone_number="+64211111111",
        postal_code="98101",
        state_or_region="WA",
        website_url="https://www.examplecorp.com")
    
    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.NewPrimaryContact(ctx, "test", &account.PrimaryContactArgs{
    			AddressLine1:     pulumi.String("123 Any Street"),
    			City:             pulumi.String("Seattle"),
    			CompanyName:      pulumi.String("Example Corp, Inc."),
    			CountryCode:      pulumi.String("US"),
    			DistrictOrCounty: pulumi.String("King"),
    			FullName:         pulumi.String("My Name"),
    			PhoneNumber:      pulumi.String("+64211111111"),
    			PostalCode:       pulumi.String("98101"),
    			StateOrRegion:    pulumi.String("WA"),
    			WebsiteUrl:       pulumi.String("https://www.examplecorp.com"),
    		})
    		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 = new Aws.Account.PrimaryContact("test", new()
        {
            AddressLine1 = "123 Any Street",
            City = "Seattle",
            CompanyName = "Example Corp, Inc.",
            CountryCode = "US",
            DistrictOrCounty = "King",
            FullName = "My Name",
            PhoneNumber = "+64211111111",
            PostalCode = "98101",
            StateOrRegion = "WA",
            WebsiteUrl = "https://www.examplecorp.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.account.PrimaryContact;
    import com.pulumi.aws.account.PrimaryContactArgs;
    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) {
            var test = new PrimaryContact("test", PrimaryContactArgs.builder()
                .addressLine1("123 Any Street")
                .city("Seattle")
                .companyName("Example Corp, Inc.")
                .countryCode("US")
                .districtOrCounty("King")
                .fullName("My Name")
                .phoneNumber("+64211111111")
                .postalCode("98101")
                .stateOrRegion("WA")
                .websiteUrl("https://www.examplecorp.com")
                .build());
    
        }
    }
    
    resources:
      test:
        type: aws:account:PrimaryContact
        properties:
          addressLine1: 123 Any Street
          city: Seattle
          companyName: Example Corp, Inc.
          countryCode: US
          districtOrCounty: King
          fullName: My Name
          phoneNumber: '+64211111111'
          postalCode: '98101'
          stateOrRegion: WA
          websiteUrl: https://www.examplecorp.com
    

    Create PrimaryContact Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PrimaryContact(name: string, args: PrimaryContactArgs, opts?: CustomResourceOptions);
    @overload
    def PrimaryContact(resource_name: str,
                       args: PrimaryContactArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrimaryContact(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       phone_number: Optional[str] = None,
                       address_line1: Optional[str] = None,
                       city: Optional[str] = None,
                       country_code: Optional[str] = None,
                       full_name: Optional[str] = None,
                       postal_code: Optional[str] = None,
                       address_line2: Optional[str] = None,
                       address_line3: Optional[str] = None,
                       company_name: Optional[str] = None,
                       district_or_county: Optional[str] = None,
                       account_id: Optional[str] = None,
                       state_or_region: Optional[str] = None,
                       website_url: Optional[str] = None)
    func NewPrimaryContact(ctx *Context, name string, args PrimaryContactArgs, opts ...ResourceOption) (*PrimaryContact, error)
    public PrimaryContact(string name, PrimaryContactArgs args, CustomResourceOptions? opts = null)
    public PrimaryContact(String name, PrimaryContactArgs args)
    public PrimaryContact(String name, PrimaryContactArgs args, CustomResourceOptions options)
    
    type: aws:account:PrimaryContact
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PrimaryContactArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PrimaryContactArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PrimaryContactArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrimaryContactArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrimaryContactArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var primaryContactResource = new Aws.Account.PrimaryContact("primaryContactResource", new()
    {
        PhoneNumber = "string",
        AddressLine1 = "string",
        City = "string",
        CountryCode = "string",
        FullName = "string",
        PostalCode = "string",
        AddressLine2 = "string",
        AddressLine3 = "string",
        CompanyName = "string",
        DistrictOrCounty = "string",
        AccountId = "string",
        StateOrRegion = "string",
        WebsiteUrl = "string",
    });
    
    example, err := account.NewPrimaryContact(ctx, "primaryContactResource", &account.PrimaryContactArgs{
    	PhoneNumber:      pulumi.String("string"),
    	AddressLine1:     pulumi.String("string"),
    	City:             pulumi.String("string"),
    	CountryCode:      pulumi.String("string"),
    	FullName:         pulumi.String("string"),
    	PostalCode:       pulumi.String("string"),
    	AddressLine2:     pulumi.String("string"),
    	AddressLine3:     pulumi.String("string"),
    	CompanyName:      pulumi.String("string"),
    	DistrictOrCounty: pulumi.String("string"),
    	AccountId:        pulumi.String("string"),
    	StateOrRegion:    pulumi.String("string"),
    	WebsiteUrl:       pulumi.String("string"),
    })
    
    var primaryContactResource = new PrimaryContact("primaryContactResource", PrimaryContactArgs.builder()
        .phoneNumber("string")
        .addressLine1("string")
        .city("string")
        .countryCode("string")
        .fullName("string")
        .postalCode("string")
        .addressLine2("string")
        .addressLine3("string")
        .companyName("string")
        .districtOrCounty("string")
        .accountId("string")
        .stateOrRegion("string")
        .websiteUrl("string")
        .build());
    
    primary_contact_resource = aws.account.PrimaryContact("primaryContactResource",
        phone_number="string",
        address_line1="string",
        city="string",
        country_code="string",
        full_name="string",
        postal_code="string",
        address_line2="string",
        address_line3="string",
        company_name="string",
        district_or_county="string",
        account_id="string",
        state_or_region="string",
        website_url="string")
    
    const primaryContactResource = new aws.account.PrimaryContact("primaryContactResource", {
        phoneNumber: "string",
        addressLine1: "string",
        city: "string",
        countryCode: "string",
        fullName: "string",
        postalCode: "string",
        addressLine2: "string",
        addressLine3: "string",
        companyName: "string",
        districtOrCounty: "string",
        accountId: "string",
        stateOrRegion: "string",
        websiteUrl: "string",
    });
    
    type: aws:account:PrimaryContact
    properties:
        accountId: string
        addressLine1: string
        addressLine2: string
        addressLine3: string
        city: string
        companyName: string
        countryCode: string
        districtOrCounty: string
        fullName: string
        phoneNumber: string
        postalCode: string
        stateOrRegion: string
        websiteUrl: string
    

    PrimaryContact Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PrimaryContact resource accepts the following input properties:

    AddressLine1 string
    The first line of the primary contact address.
    City string
    The city of the primary contact address.
    CountryCode string
    The ISO-3166 two-letter country code for the primary contact address.
    FullName string
    The full name of the primary contact address.
    PhoneNumber string
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    PostalCode string
    The postal code of the primary contact address.
    AccountId string
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    AddressLine2 string
    The second line of the primary contact address, if any.
    AddressLine3 string
    The third line of the primary contact address, if any.
    CompanyName string
    The name of the company associated with the primary contact information, if any.
    DistrictOrCounty string
    The district or county of the primary contact address, if any.
    StateOrRegion string
    The state or region of the primary contact address. This field is required in selected countries.
    WebsiteUrl string
    The URL of the website associated with the primary contact information, if any.
    AddressLine1 string
    The first line of the primary contact address.
    City string
    The city of the primary contact address.
    CountryCode string
    The ISO-3166 two-letter country code for the primary contact address.
    FullName string
    The full name of the primary contact address.
    PhoneNumber string
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    PostalCode string
    The postal code of the primary contact address.
    AccountId string
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    AddressLine2 string
    The second line of the primary contact address, if any.
    AddressLine3 string
    The third line of the primary contact address, if any.
    CompanyName string
    The name of the company associated with the primary contact information, if any.
    DistrictOrCounty string
    The district or county of the primary contact address, if any.
    StateOrRegion string
    The state or region of the primary contact address. This field is required in selected countries.
    WebsiteUrl string
    The URL of the website associated with the primary contact information, if any.
    addressLine1 String
    The first line of the primary contact address.
    city String
    The city of the primary contact address.
    countryCode String
    The ISO-3166 two-letter country code for the primary contact address.
    fullName String
    The full name of the primary contact address.
    phoneNumber String
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    postalCode String
    The postal code of the primary contact address.
    accountId String
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    addressLine2 String
    The second line of the primary contact address, if any.
    addressLine3 String
    The third line of the primary contact address, if any.
    companyName String
    The name of the company associated with the primary contact information, if any.
    districtOrCounty String
    The district or county of the primary contact address, if any.
    stateOrRegion String
    The state or region of the primary contact address. This field is required in selected countries.
    websiteUrl String
    The URL of the website associated with the primary contact information, if any.
    addressLine1 string
    The first line of the primary contact address.
    city string
    The city of the primary contact address.
    countryCode string
    The ISO-3166 two-letter country code for the primary contact address.
    fullName string
    The full name of the primary contact address.
    phoneNumber string
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    postalCode string
    The postal code of the primary contact address.
    accountId string
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    addressLine2 string
    The second line of the primary contact address, if any.
    addressLine3 string
    The third line of the primary contact address, if any.
    companyName string
    The name of the company associated with the primary contact information, if any.
    districtOrCounty string
    The district or county of the primary contact address, if any.
    stateOrRegion string
    The state or region of the primary contact address. This field is required in selected countries.
    websiteUrl string
    The URL of the website associated with the primary contact information, if any.
    address_line1 str
    The first line of the primary contact address.
    city str
    The city of the primary contact address.
    country_code str
    The ISO-3166 two-letter country code for the primary contact address.
    full_name str
    The full name of the primary contact address.
    phone_number str
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    postal_code str
    The postal code of the primary contact address.
    account_id str
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    address_line2 str
    The second line of the primary contact address, if any.
    address_line3 str
    The third line of the primary contact address, if any.
    company_name str
    The name of the company associated with the primary contact information, if any.
    district_or_county str
    The district or county of the primary contact address, if any.
    state_or_region str
    The state or region of the primary contact address. This field is required in selected countries.
    website_url str
    The URL of the website associated with the primary contact information, if any.
    addressLine1 String
    The first line of the primary contact address.
    city String
    The city of the primary contact address.
    countryCode String
    The ISO-3166 two-letter country code for the primary contact address.
    fullName String
    The full name of the primary contact address.
    phoneNumber String
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    postalCode String
    The postal code of the primary contact address.
    accountId String
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    addressLine2 String
    The second line of the primary contact address, if any.
    addressLine3 String
    The third line of the primary contact address, if any.
    companyName String
    The name of the company associated with the primary contact information, if any.
    districtOrCounty String
    The district or county of the primary contact address, if any.
    stateOrRegion String
    The state or region of the primary contact address. This field is required in selected countries.
    websiteUrl String
    The URL of the website associated with the primary contact information, if any.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PrimaryContact resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PrimaryContact Resource

    Get an existing PrimaryContact resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PrimaryContactState, opts?: CustomResourceOptions): PrimaryContact
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            address_line1: Optional[str] = None,
            address_line2: Optional[str] = None,
            address_line3: Optional[str] = None,
            city: Optional[str] = None,
            company_name: Optional[str] = None,
            country_code: Optional[str] = None,
            district_or_county: Optional[str] = None,
            full_name: Optional[str] = None,
            phone_number: Optional[str] = None,
            postal_code: Optional[str] = None,
            state_or_region: Optional[str] = None,
            website_url: Optional[str] = None) -> PrimaryContact
    func GetPrimaryContact(ctx *Context, name string, id IDInput, state *PrimaryContactState, opts ...ResourceOption) (*PrimaryContact, error)
    public static PrimaryContact Get(string name, Input<string> id, PrimaryContactState? state, CustomResourceOptions? opts = null)
    public static PrimaryContact get(String name, Output<String> id, PrimaryContactState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state 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.
    AddressLine1 string
    The first line of the primary contact address.
    AddressLine2 string
    The second line of the primary contact address, if any.
    AddressLine3 string
    The third line of the primary contact address, if any.
    City string
    The city of the primary contact address.
    CompanyName string
    The name of the company associated with the primary contact information, if any.
    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, if any.
    FullName string
    The full name of the primary contact address.
    PhoneNumber string
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    PostalCode string
    The postal code of the primary contact address.
    StateOrRegion string
    The state or region of the primary contact address. This field is required in selected countries.
    WebsiteUrl string
    The URL of the website associated with the primary contact information, if any.
    AccountId string
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    AddressLine1 string
    The first line of the primary contact address.
    AddressLine2 string
    The second line of the primary contact address, if any.
    AddressLine3 string
    The third line of the primary contact address, if any.
    City string
    The city of the primary contact address.
    CompanyName string
    The name of the company associated with the primary contact information, if any.
    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, if any.
    FullName string
    The full name of the primary contact address.
    PhoneNumber string
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    PostalCode string
    The postal code of the primary contact address.
    StateOrRegion string
    The state or region of the primary contact address. This field is required in selected countries.
    WebsiteUrl string
    The URL of the website associated with the primary contact information, if any.
    accountId String
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    addressLine1 String
    The first line of the primary contact address.
    addressLine2 String
    The second line of the primary contact address, if any.
    addressLine3 String
    The third line of the primary contact address, if any.
    city String
    The city of the primary contact address.
    companyName String
    The name of the company associated with the primary contact information, if any.
    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, if any.
    fullName String
    The full name of the primary contact address.
    phoneNumber String
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    postalCode String
    The postal code of the primary contact address.
    stateOrRegion String
    The state or region of the primary contact address. This field is required in selected countries.
    websiteUrl String
    The URL of the website associated with the primary contact information, if any.
    accountId string
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    addressLine1 string
    The first line of the primary contact address.
    addressLine2 string
    The second line of the primary contact address, if any.
    addressLine3 string
    The third line of the primary contact address, if any.
    city string
    The city of the primary contact address.
    companyName string
    The name of the company associated with the primary contact information, if any.
    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, if any.
    fullName string
    The full name of the primary contact address.
    phoneNumber string
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    postalCode string
    The postal code of the primary contact address.
    stateOrRegion string
    The state or region of the primary contact address. This field is required in selected countries.
    websiteUrl string
    The URL of the website associated with the primary contact information, if any.
    account_id str
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    address_line1 str
    The first line of the primary contact address.
    address_line2 str
    The second line of the primary contact address, if any.
    address_line3 str
    The third line of the primary contact address, if any.
    city str
    The city of the primary contact address.
    company_name str
    The name of the company associated with the primary contact information, if any.
    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, if any.
    full_name str
    The full name of the primary contact address.
    phone_number str
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    postal_code str
    The postal code of the primary contact address.
    state_or_region str
    The state or region of the primary contact address. This field is required in selected countries.
    website_url str
    The URL of the website associated with the primary contact information, if any.
    accountId String
    The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
    addressLine1 String
    The first line of the primary contact address.
    addressLine2 String
    The second line of the primary contact address, if any.
    addressLine3 String
    The third line of the primary contact address, if any.
    city String
    The city of the primary contact address.
    companyName String
    The name of the company associated with the primary contact information, if any.
    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, if any.
    fullName String
    The full name of the primary contact address.
    phoneNumber String
    The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
    postalCode String
    The postal code of the primary contact address.
    stateOrRegion String
    The state or region of the primary contact address. This field is required in selected countries.
    websiteUrl String
    The URL of the website associated with the primary contact information, if any.

    Import

    Using pulumi import, import the Primary Contact using the account_id. For example:

    $ pulumi import aws:account/primaryContact:PrimaryContact test 1234567890
    

    To learn more about importing existing cloud resources, see Importing resources.

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.45.0 published on Tuesday, Jul 16, 2024 by Pulumi