aws.account.PrimaryContact
Explore with Pulumi AI
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PrimaryContact resource accepts the following input properties:
- Address
Line1 string - The first line of the primary contact address.
- City string
- The city of the primary contact address.
- Country
Code string - The ISO-3166 two-letter country code for the primary contact address.
- Full
Name string - The full name of the primary contact address.
- Phone
Number string - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- Postal
Code string - The postal code of the primary contact address.
- Account
Id string - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- Address
Line2 string - The second line of the primary contact address, if any.
- Address
Line3 string - The third line of the primary contact address, if any.
- Company
Name string - The name of the company associated with the primary contact information, if any.
- District
Or stringCounty - The district or county of the primary contact address, if any.
- State
Or stringRegion - The state or region of the primary contact address. This field is required in selected countries.
- Website
Url string - The URL of the website associated with the primary contact information, if any.
- Address
Line1 string - The first line of the primary contact address.
- City string
- The city of the primary contact address.
- Country
Code string - The ISO-3166 two-letter country code for the primary contact address.
- Full
Name string - The full name of the primary contact address.
- Phone
Number string - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- Postal
Code string - The postal code of the primary contact address.
- Account
Id string - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- Address
Line2 string - The second line of the primary contact address, if any.
- Address
Line3 string - The third line of the primary contact address, if any.
- Company
Name string - The name of the company associated with the primary contact information, if any.
- District
Or stringCounty - The district or county of the primary contact address, if any.
- State
Or stringRegion - The state or region of the primary contact address. This field is required in selected countries.
- Website
Url string - The URL of the website associated with the primary contact information, if any.
- address
Line1 String - The first line of the primary contact address.
- city String
- The city of the primary contact address.
- country
Code String - The ISO-3166 two-letter country code for the primary contact address.
- full
Name String - The full name of the primary contact address.
- phone
Number String - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- postal
Code String - The postal code of the primary contact address.
- account
Id String - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- address
Line2 String - The second line of the primary contact address, if any.
- address
Line3 String - The third line of the primary contact address, if any.
- company
Name String - The name of the company associated with the primary contact information, if any.
- district
Or StringCounty - The district or county of the primary contact address, if any.
- state
Or StringRegion - The state or region of the primary contact address. This field is required in selected countries.
- website
Url String - The URL of the website associated with the primary contact information, if any.
- address
Line1 string - The first line of the primary contact address.
- city string
- The city of the primary contact address.
- country
Code string - The ISO-3166 two-letter country code for the primary contact address.
- full
Name string - The full name of the primary contact address.
- phone
Number string - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- postal
Code string - The postal code of the primary contact address.
- account
Id string - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- address
Line2 string - The second line of the primary contact address, if any.
- address
Line3 string - The third line of the primary contact address, if any.
- company
Name string - The name of the company associated with the primary contact information, if any.
- district
Or stringCounty - The district or county of the primary contact address, if any.
- state
Or stringRegion - The state or region of the primary contact address. This field is required in selected countries.
- website
Url 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_ strcounty - The district or county of the primary contact address, if any.
- state_
or_ strregion - 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.
- address
Line1 String - The first line of the primary contact address.
- city String
- The city of the primary contact address.
- country
Code String - The ISO-3166 two-letter country code for the primary contact address.
- full
Name String - The full name of the primary contact address.
- phone
Number String - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- postal
Code String - The postal code of the primary contact address.
- account
Id String - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- address
Line2 String - The second line of the primary contact address, if any.
- address
Line3 String - The third line of the primary contact address, if any.
- company
Name String - The name of the company associated with the primary contact information, if any.
- district
Or StringCounty - The district or county of the primary contact address, if any.
- state
Or StringRegion - The state or region of the primary contact address. This field is required in selected countries.
- website
Url 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.
- Account
Id string - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- Address
Line1 string - The first line of the primary contact address.
- Address
Line2 string - The second line of the primary contact address, if any.
- Address
Line3 string - The third line of the primary contact address, if any.
- City string
- The city of the primary contact address.
- Company
Name string - The name of the company associated with the primary contact information, if any.
- 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, if any.
- Full
Name string - The full name of the primary contact address.
- Phone
Number string - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- Postal
Code string - The postal code of the primary contact address.
- State
Or stringRegion - The state or region of the primary contact address. This field is required in selected countries.
- Website
Url string - The URL of the website associated with the primary contact information, if any.
- Account
Id string - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- Address
Line1 string - The first line of the primary contact address.
- Address
Line2 string - The second line of the primary contact address, if any.
- Address
Line3 string - The third line of the primary contact address, if any.
- City string
- The city of the primary contact address.
- Company
Name string - The name of the company associated with the primary contact information, if any.
- 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, if any.
- Full
Name string - The full name of the primary contact address.
- Phone
Number string - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- Postal
Code string - The postal code of the primary contact address.
- State
Or stringRegion - The state or region of the primary contact address. This field is required in selected countries.
- Website
Url string - The URL of the website associated with the primary contact information, if any.
- account
Id String - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- address
Line1 String - The first line of the primary contact address.
- address
Line2 String - The second line of the primary contact address, if any.
- address
Line3 String - The third line of the primary contact address, if any.
- city String
- The city of the primary contact address.
- company
Name String - The name of the company associated with the primary contact information, if any.
- 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, if any.
- full
Name String - The full name of the primary contact address.
- phone
Number String - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- postal
Code String - The postal code of the primary contact address.
- state
Or StringRegion - The state or region of the primary contact address. This field is required in selected countries.
- website
Url String - The URL of the website associated with the primary contact information, if any.
- account
Id string - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- address
Line1 string - The first line of the primary contact address.
- address
Line2 string - The second line of the primary contact address, if any.
- address
Line3 string - The third line of the primary contact address, if any.
- city string
- The city of the primary contact address.
- company
Name string - The name of the company associated with the primary contact information, if any.
- 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, if any.
- full
Name string - The full name of the primary contact address.
- phone
Number string - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- postal
Code string - The postal code of the primary contact address.
- state
Or stringRegion - The state or region of the primary contact address. This field is required in selected countries.
- website
Url 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_ strcounty - 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_ strregion - 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.
- account
Id String - The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
- address
Line1 String - The first line of the primary contact address.
- address
Line2 String - The second line of the primary contact address, if any.
- address
Line3 String - The third line of the primary contact address, if any.
- city String
- The city of the primary contact address.
- company
Name String - The name of the company associated with the primary contact information, if any.
- 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, if any.
- full
Name String - The full name of the primary contact address.
- phone
Number String - The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
- postal
Code String - The postal code of the primary contact address.
- state
Or StringRegion - The state or region of the primary contact address. This field is required in selected countries.
- website
Url 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.