1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. VpcIpamOrganizationAdminAccount
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.ec2.VpcIpamOrganizationAdminAccount

Explore with Pulumi AI

Enables the IPAM Service and promotes a delegated administrator.

Example Usage

Basic usage:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const delegated = aws.getCallerIdentity({});
const example = new aws.ec2.VpcIpamOrganizationAdminAccount("example", {delegatedAdminAccountId: delegated.then(delegated => delegated.accountId)});
Copy
import pulumi
import pulumi_aws as aws

delegated = aws.get_caller_identity()
example = aws.ec2.VpcIpamOrganizationAdminAccount("example", delegated_admin_account_id=delegated.account_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		delegated, err := aws.GetCallerIdentity(ctx, &aws.GetCallerIdentityArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcIpamOrganizationAdminAccount(ctx, "example", &ec2.VpcIpamOrganizationAdminAccountArgs{
			DelegatedAdminAccountId: pulumi.String(delegated.AccountId),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var delegated = Aws.GetCallerIdentity.Invoke();

    var example = new Aws.Ec2.VpcIpamOrganizationAdminAccount("example", new()
    {
        DelegatedAdminAccountId = delegated.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetCallerIdentityArgs;
import com.pulumi.aws.ec2.VpcIpamOrganizationAdminAccount;
import com.pulumi.aws.ec2.VpcIpamOrganizationAdminAccountArgs;
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 delegated = AwsFunctions.getCallerIdentity(GetCallerIdentityArgs.builder()
            .build());

        var example = new VpcIpamOrganizationAdminAccount("example", VpcIpamOrganizationAdminAccountArgs.builder()
            .delegatedAdminAccountId(delegated.accountId())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:ec2:VpcIpamOrganizationAdminAccount
    properties:
      delegatedAdminAccountId: ${delegated.accountId}
variables:
  delegated:
    fn::invoke:
      function: aws:getCallerIdentity
      arguments: {}
Copy

Create VpcIpamOrganizationAdminAccount Resource

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

Constructor syntax

new VpcIpamOrganizationAdminAccount(name: string, args: VpcIpamOrganizationAdminAccountArgs, opts?: CustomResourceOptions);
@overload
def VpcIpamOrganizationAdminAccount(resource_name: str,
                                    args: VpcIpamOrganizationAdminAccountArgs,
                                    opts: Optional[ResourceOptions] = None)

@overload
def VpcIpamOrganizationAdminAccount(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    delegated_admin_account_id: Optional[str] = None)
func NewVpcIpamOrganizationAdminAccount(ctx *Context, name string, args VpcIpamOrganizationAdminAccountArgs, opts ...ResourceOption) (*VpcIpamOrganizationAdminAccount, error)
public VpcIpamOrganizationAdminAccount(string name, VpcIpamOrganizationAdminAccountArgs args, CustomResourceOptions? opts = null)
public VpcIpamOrganizationAdminAccount(String name, VpcIpamOrganizationAdminAccountArgs args)
public VpcIpamOrganizationAdminAccount(String name, VpcIpamOrganizationAdminAccountArgs args, CustomResourceOptions options)
type: aws:ec2:VpcIpamOrganizationAdminAccount
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VpcIpamOrganizationAdminAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VpcIpamOrganizationAdminAccountArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VpcIpamOrganizationAdminAccountArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VpcIpamOrganizationAdminAccountArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpcIpamOrganizationAdminAccountArgs
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 vpcIpamOrganizationAdminAccountResource = new Aws.Ec2.VpcIpamOrganizationAdminAccount("vpcIpamOrganizationAdminAccountResource", new()
{
    DelegatedAdminAccountId = "string",
});
Copy
example, err := ec2.NewVpcIpamOrganizationAdminAccount(ctx, "vpcIpamOrganizationAdminAccountResource", &ec2.VpcIpamOrganizationAdminAccountArgs{
	DelegatedAdminAccountId: pulumi.String("string"),
})
Copy
var vpcIpamOrganizationAdminAccountResource = new VpcIpamOrganizationAdminAccount("vpcIpamOrganizationAdminAccountResource", VpcIpamOrganizationAdminAccountArgs.builder()
    .delegatedAdminAccountId("string")
    .build());
Copy
vpc_ipam_organization_admin_account_resource = aws.ec2.VpcIpamOrganizationAdminAccount("vpcIpamOrganizationAdminAccountResource", delegated_admin_account_id="string")
Copy
const vpcIpamOrganizationAdminAccountResource = new aws.ec2.VpcIpamOrganizationAdminAccount("vpcIpamOrganizationAdminAccountResource", {delegatedAdminAccountId: "string"});
Copy
type: aws:ec2:VpcIpamOrganizationAdminAccount
properties:
    delegatedAdminAccountId: string
Copy

VpcIpamOrganizationAdminAccount 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 VpcIpamOrganizationAdminAccount resource accepts the following input properties:

DelegatedAdminAccountId
This property is required.
Changes to this property will trigger replacement.
string
DelegatedAdminAccountId
This property is required.
Changes to this property will trigger replacement.
string
delegatedAdminAccountId
This property is required.
Changes to this property will trigger replacement.
String
delegatedAdminAccountId
This property is required.
Changes to this property will trigger replacement.
string
delegated_admin_account_id
This property is required.
Changes to this property will trigger replacement.
str
delegatedAdminAccountId
This property is required.
Changes to this property will trigger replacement.
String

Outputs

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

Arn string
The Organizations ARN for the delegate account.
Email string
The Organizations email for the delegate account.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The Organizations name for the delegate account.
ServicePrincipal string
The AWS service principal.
Arn string
The Organizations ARN for the delegate account.
Email string
The Organizations email for the delegate account.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The Organizations name for the delegate account.
ServicePrincipal string
The AWS service principal.
arn String
The Organizations ARN for the delegate account.
email String
The Organizations email for the delegate account.
id String
The provider-assigned unique ID for this managed resource.
name String
The Organizations name for the delegate account.
servicePrincipal String
The AWS service principal.
arn string
The Organizations ARN for the delegate account.
email string
The Organizations email for the delegate account.
id string
The provider-assigned unique ID for this managed resource.
name string
The Organizations name for the delegate account.
servicePrincipal string
The AWS service principal.
arn str
The Organizations ARN for the delegate account.
email str
The Organizations email for the delegate account.
id str
The provider-assigned unique ID for this managed resource.
name str
The Organizations name for the delegate account.
service_principal str
The AWS service principal.
arn String
The Organizations ARN for the delegate account.
email String
The Organizations email for the delegate account.
id String
The provider-assigned unique ID for this managed resource.
name String
The Organizations name for the delegate account.
servicePrincipal String
The AWS service principal.

Look up Existing VpcIpamOrganizationAdminAccount Resource

Get an existing VpcIpamOrganizationAdminAccount 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?: VpcIpamOrganizationAdminAccountState, opts?: CustomResourceOptions): VpcIpamOrganizationAdminAccount
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        delegated_admin_account_id: Optional[str] = None,
        email: Optional[str] = None,
        name: Optional[str] = None,
        service_principal: Optional[str] = None) -> VpcIpamOrganizationAdminAccount
func GetVpcIpamOrganizationAdminAccount(ctx *Context, name string, id IDInput, state *VpcIpamOrganizationAdminAccountState, opts ...ResourceOption) (*VpcIpamOrganizationAdminAccount, error)
public static VpcIpamOrganizationAdminAccount Get(string name, Input<string> id, VpcIpamOrganizationAdminAccountState? state, CustomResourceOptions? opts = null)
public static VpcIpamOrganizationAdminAccount get(String name, Output<String> id, VpcIpamOrganizationAdminAccountState state, CustomResourceOptions options)
resources:  _:    type: aws:ec2:VpcIpamOrganizationAdminAccount    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Arn string
The Organizations ARN for the delegate account.
DelegatedAdminAccountId Changes to this property will trigger replacement. string
Email string
The Organizations email for the delegate account.
Name string
The Organizations name for the delegate account.
ServicePrincipal string
The AWS service principal.
Arn string
The Organizations ARN for the delegate account.
DelegatedAdminAccountId Changes to this property will trigger replacement. string
Email string
The Organizations email for the delegate account.
Name string
The Organizations name for the delegate account.
ServicePrincipal string
The AWS service principal.
arn String
The Organizations ARN for the delegate account.
delegatedAdminAccountId Changes to this property will trigger replacement. String
email String
The Organizations email for the delegate account.
name String
The Organizations name for the delegate account.
servicePrincipal String
The AWS service principal.
arn string
The Organizations ARN for the delegate account.
delegatedAdminAccountId Changes to this property will trigger replacement. string
email string
The Organizations email for the delegate account.
name string
The Organizations name for the delegate account.
servicePrincipal string
The AWS service principal.
arn str
The Organizations ARN for the delegate account.
delegated_admin_account_id Changes to this property will trigger replacement. str
email str
The Organizations email for the delegate account.
name str
The Organizations name for the delegate account.
service_principal str
The AWS service principal.
arn String
The Organizations ARN for the delegate account.
delegatedAdminAccountId Changes to this property will trigger replacement. String
email String
The Organizations email for the delegate account.
name String
The Organizations name for the delegate account.
servicePrincipal String
The AWS service principal.

Import

Using pulumi import, import IPAMs using the delegate account id. For example:

$ pulumi import aws:ec2/vpcIpamOrganizationAdminAccount:VpcIpamOrganizationAdminAccount example 12345678901
Copy

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.