1. Packages
  2. AWS
  3. API Docs
  4. costoptimizationhub
  5. EnrollmentStatus
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.costoptimizationhub.EnrollmentStatus

Explore with Pulumi AI

Resource for managing AWS Cost Optimization Hub Enrollment Status.

TIP: The Cost Optimization Hub only has a us-east-1 endpoint. However, you can access the service globally with the AWS Provider from other regions. Other tools, such as the AWS CLI, may require you to specify the us-east-1 region when using the service.

Example Usage

Basic Usage

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

const example = new aws.costoptimizationhub.EnrollmentStatus("example", {});
Copy
import pulumi
import pulumi_aws as aws

example = aws.costoptimizationhub.EnrollmentStatus("example")
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := costoptimizationhub.NewEnrollmentStatus(ctx, "example", nil)
		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 example = new Aws.CostOptimizationHub.EnrollmentStatus("example");

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.costoptimizationhub.EnrollmentStatus;
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 example = new EnrollmentStatus("example");

    }
}
Copy
resources:
  example:
    type: aws:costoptimizationhub:EnrollmentStatus
Copy

Usage with all the arguments

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

const example = new aws.costoptimizationhub.EnrollmentStatus("example", {includeMemberAccounts: true});
Copy
import pulumi
import pulumi_aws as aws

example = aws.costoptimizationhub.EnrollmentStatus("example", include_member_accounts=True)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := costoptimizationhub.NewEnrollmentStatus(ctx, "example", &costoptimizationhub.EnrollmentStatusArgs{
			IncludeMemberAccounts: pulumi.Bool(true),
		})
		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 example = new Aws.CostOptimizationHub.EnrollmentStatus("example", new()
    {
        IncludeMemberAccounts = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.costoptimizationhub.EnrollmentStatus;
import com.pulumi.aws.costoptimizationhub.EnrollmentStatusArgs;
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 example = new EnrollmentStatus("example", EnrollmentStatusArgs.builder()
            .includeMemberAccounts(true)
            .build());

    }
}
Copy
resources:
  example:
    type: aws:costoptimizationhub:EnrollmentStatus
    properties:
      includeMemberAccounts: true
Copy

Create EnrollmentStatus Resource

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

Constructor syntax

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

@overload
def EnrollmentStatus(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     include_member_accounts: Optional[bool] = None)
func NewEnrollmentStatus(ctx *Context, name string, args *EnrollmentStatusArgs, opts ...ResourceOption) (*EnrollmentStatus, error)
public EnrollmentStatus(string name, EnrollmentStatusArgs? args = null, CustomResourceOptions? opts = null)
public EnrollmentStatus(String name, EnrollmentStatusArgs args)
public EnrollmentStatus(String name, EnrollmentStatusArgs args, CustomResourceOptions options)
type: aws:costoptimizationhub:EnrollmentStatus
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 EnrollmentStatusArgs
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 EnrollmentStatusArgs
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 EnrollmentStatusArgs
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 EnrollmentStatusArgs
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. EnrollmentStatusArgs
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 awsEnrollmentStatusResource = new Aws.CostOptimizationHub.EnrollmentStatus("awsEnrollmentStatusResource", new()
{
    IncludeMemberAccounts = false,
});
Copy
example, err := costoptimizationhub.NewEnrollmentStatus(ctx, "awsEnrollmentStatusResource", &costoptimizationhub.EnrollmentStatusArgs{
	IncludeMemberAccounts: pulumi.Bool(false),
})
Copy
var awsEnrollmentStatusResource = new EnrollmentStatus("awsEnrollmentStatusResource", EnrollmentStatusArgs.builder()
    .includeMemberAccounts(false)
    .build());
Copy
aws_enrollment_status_resource = aws.costoptimizationhub.EnrollmentStatus("awsEnrollmentStatusResource", include_member_accounts=False)
Copy
const awsEnrollmentStatusResource = new aws.costoptimizationhub.EnrollmentStatus("awsEnrollmentStatusResource", {includeMemberAccounts: false});
Copy
type: aws:costoptimizationhub:EnrollmentStatus
properties:
    includeMemberAccounts: false
Copy

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

IncludeMemberAccounts bool
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
IncludeMemberAccounts bool
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
includeMemberAccounts Boolean
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
includeMemberAccounts boolean
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
include_member_accounts bool
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
includeMemberAccounts Boolean
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.

Outputs

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

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

Look up Existing EnrollmentStatus Resource

Get an existing EnrollmentStatus 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?: EnrollmentStatusState, opts?: CustomResourceOptions): EnrollmentStatus
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        include_member_accounts: Optional[bool] = None,
        status: Optional[str] = None) -> EnrollmentStatus
func GetEnrollmentStatus(ctx *Context, name string, id IDInput, state *EnrollmentStatusState, opts ...ResourceOption) (*EnrollmentStatus, error)
public static EnrollmentStatus Get(string name, Input<string> id, EnrollmentStatusState? state, CustomResourceOptions? opts = null)
public static EnrollmentStatus get(String name, Output<String> id, EnrollmentStatusState state, CustomResourceOptions options)
resources:  _:    type: aws:costoptimizationhub:EnrollmentStatus    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:
IncludeMemberAccounts bool
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
Status string
IncludeMemberAccounts bool
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
Status string
includeMemberAccounts Boolean
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
status String
includeMemberAccounts boolean
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
status string
include_member_accounts bool
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
status str
includeMemberAccounts Boolean
Flag to enroll member accounts of the organization if the account is the management account. No drift detection is currently supported for this argument. Default value is false.
status String

Import

Using pulumi import, import Cost Optimization Hub Enrollment Status using your AWS account ID. For example:

$ pulumi import aws:costoptimizationhub/enrollmentStatus:EnrollmentStatus example 111222333444
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.