PrimaryContact class
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.example.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.example.com")
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.example.com",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/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.example.com"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "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.example.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.ArrayList;
import java.util.Arrays;
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.example.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.example.com
Import
Using pulumi import, import the Primary Contact using the accountId. For example:
$ pulumi import aws:account/primaryContact:PrimaryContact test 1234567890
Constructors
- PrimaryContact(String name, {PrimaryContactArgs? args, CustomResourceOptions? options})
-
Creates a new PrimaryContact.
nameThe Pulumi resource name.argsArguments used to configure this PrimaryContact. The set of arguments for PrimaryContact.optionsResource options controlling this resource's behavior. - PrimaryContact.reference(String urn)
- Creates a typed reference to an existing PrimaryContact resource.
Properties
-
accountId
↔ Output<
String?> -
The ID of the target account when managing member accounts. Will manage current user's account by default if omitted.
latefinal
-
addressLine1
↔ Output<
String> -
The first line of the primary contact address.
latefinal
-
addressLine2
↔ Output<
String?> -
The second line of the primary contact address, if any.
latefinal
-
addressLine3
↔ Output<
String?> -
The third line of the primary contact address, if any.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
city
↔ Output<
String> -
The city of the primary contact address.
latefinal
-
companyName
↔ Output<
String?> -
The name of the company associated with the primary contact information, if any.
latefinal
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
countryCode
↔ Output<
String> -
The ISO-3166 two-letter country code for the primary contact address.
latefinal
-
districtOrCounty
↔ Output<
String?> -
The district or county of the primary contact address, if any.
latefinal
-
fullName
↔ Output<
String> -
The full name of the primary contact address.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
phoneNumber
↔ Output<
String> -
The phone number of the primary contact information. The number will be validated and, in some countries, checked for activation.
latefinal
-
postalCode
↔ Output<
String> -
The postal code of the primary contact address.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stateOrRegion
↔ Output<
String?> -
The state or region of the primary contact address. This field is required in selected countries.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
websiteUrl
↔ Output<
String?> -
The URL of the website associated with the primary contact information, if any.
latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {PrimaryContactState? state, CustomResourceOptions? options}) → PrimaryContact -
Gets an existing PrimaryContact resource's state with the given
nameandid.