1. Packages
  2. AWS Classic
  3. API Docs
  4. inspector2
  5. DelegatedAdminAccount

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

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.inspector2.DelegatedAdminAccount

Explore with Pulumi AI

aws logo

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

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    Resource for managing an Amazon Inspector Delegated Admin Account.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const current = aws.getCallerIdentity({});
    const example = new aws.inspector2.DelegatedAdminAccount("example", {accountId: current.then(current => current.accountId)});
    
    import pulumi
    import pulumi_aws as aws
    
    current = aws.get_caller_identity()
    example = aws.inspector2.DelegatedAdminAccount("example", account_id=current.account_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/inspector2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := aws.GetCallerIdentity(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = inspector2.NewDelegatedAdminAccount(ctx, "example", &inspector2.DelegatedAdminAccountArgs{
    			AccountId: pulumi.String(current.AccountId),
    		})
    		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 current = Aws.GetCallerIdentity.Invoke();
    
        var example = new Aws.Inspector2.DelegatedAdminAccount("example", new()
        {
            AccountId = current.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
        });
    
    });
    
    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.inspector2.DelegatedAdminAccount;
    import com.pulumi.aws.inspector2.DelegatedAdminAccountArgs;
    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 current = AwsFunctions.getCallerIdentity();
    
            var example = new DelegatedAdminAccount("example", DelegatedAdminAccountArgs.builder()        
                .accountId(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:inspector2:DelegatedAdminAccount
        properties:
          accountId: ${current.accountId}
    variables:
      current:
        fn::invoke:
          Function: aws:getCallerIdentity
          Arguments: {}
    

    Create DelegatedAdminAccount Resource

    new DelegatedAdminAccount(name: string, args: DelegatedAdminAccountArgs, opts?: CustomResourceOptions);
    @overload
    def DelegatedAdminAccount(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              account_id: Optional[str] = None)
    @overload
    def DelegatedAdminAccount(resource_name: str,
                              args: DelegatedAdminAccountArgs,
                              opts: Optional[ResourceOptions] = None)
    func NewDelegatedAdminAccount(ctx *Context, name string, args DelegatedAdminAccountArgs, opts ...ResourceOption) (*DelegatedAdminAccount, error)
    public DelegatedAdminAccount(string name, DelegatedAdminAccountArgs args, CustomResourceOptions? opts = null)
    public DelegatedAdminAccount(String name, DelegatedAdminAccountArgs args)
    public DelegatedAdminAccount(String name, DelegatedAdminAccountArgs args, CustomResourceOptions options)
    
    type: aws:inspector2:DelegatedAdminAccount
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DelegatedAdminAccountArgs
    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 DelegatedAdminAccountArgs
    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 DelegatedAdminAccountArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DelegatedAdminAccountArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DelegatedAdminAccountArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    AccountId string
    Account to enable as delegated admin account.
    AccountId string
    Account to enable as delegated admin account.
    accountId String
    Account to enable as delegated admin account.
    accountId string
    Account to enable as delegated admin account.
    account_id str
    Account to enable as delegated admin account.
    accountId String
    Account to enable as delegated admin account.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    RelationshipStatus string
    Status of this delegated admin account.
    Id string
    The provider-assigned unique ID for this managed resource.
    RelationshipStatus string
    Status of this delegated admin account.
    id String
    The provider-assigned unique ID for this managed resource.
    relationshipStatus String
    Status of this delegated admin account.
    id string
    The provider-assigned unique ID for this managed resource.
    relationshipStatus string
    Status of this delegated admin account.
    id str
    The provider-assigned unique ID for this managed resource.
    relationship_status str
    Status of this delegated admin account.
    id String
    The provider-assigned unique ID for this managed resource.
    relationshipStatus String
    Status of this delegated admin account.

    Look up Existing DelegatedAdminAccount Resource

    Get an existing DelegatedAdminAccount 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?: DelegatedAdminAccountState, opts?: CustomResourceOptions): DelegatedAdminAccount
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            relationship_status: Optional[str] = None) -> DelegatedAdminAccount
    func GetDelegatedAdminAccount(ctx *Context, name string, id IDInput, state *DelegatedAdminAccountState, opts ...ResourceOption) (*DelegatedAdminAccount, error)
    public static DelegatedAdminAccount Get(string name, Input<string> id, DelegatedAdminAccountState? state, CustomResourceOptions? opts = null)
    public static DelegatedAdminAccount get(String name, Output<String> id, DelegatedAdminAccountState 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
    Account to enable as delegated admin account.
    RelationshipStatus string
    Status of this delegated admin account.
    AccountId string
    Account to enable as delegated admin account.
    RelationshipStatus string
    Status of this delegated admin account.
    accountId String
    Account to enable as delegated admin account.
    relationshipStatus String
    Status of this delegated admin account.
    accountId string
    Account to enable as delegated admin account.
    relationshipStatus string
    Status of this delegated admin account.
    account_id str
    Account to enable as delegated admin account.
    relationship_status str
    Status of this delegated admin account.
    accountId String
    Account to enable as delegated admin account.
    relationshipStatus String
    Status of this delegated admin account.

    Import

    Using pulumi import, import Inspector Delegated Admin Account using the account_id. For example:

    $ pulumi import aws:inspector2/delegatedAdminAccount:DelegatedAdminAccount example 012345678901
    

    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.28.1 published on Thursday, Mar 28, 2024 by Pulumi