aws.inspector2.DelegatedAdminAccount
Resource for managing an AWS Inspector V2 Delegated Admin Account.
Example Usage
Basic Usage
using System.Collections.Generic;
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 main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v5/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
})
}
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.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());
}
}
import pulumi
import pulumi_aws as aws
current = aws.get_caller_identity()
example = aws.inspector2.DelegatedAdminAccount("example", account_id=current.account_id)
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)});
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:
- Account
Id string Account to enable as delegated admin account.
- Account
Id string Account to enable as delegated admin account.
- account
Id String Account to enable as delegated admin account.
- account
Id string Account to enable as delegated admin account.
- account_
id str Account to enable as delegated admin account.
- account
Id 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.
- Relationship
Status string Status of this delegated admin account.
- Id string
The provider-assigned unique ID for this managed resource.
- Relationship
Status string Status of this delegated admin account.
- id String
The provider-assigned unique ID for this managed resource.
- relationship
Status String Status of this delegated admin account.
- id string
The provider-assigned unique ID for this managed resource.
- relationship
Status 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.
- relationship
Status 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.
- Account
Id string Account to enable as delegated admin account.
- Relationship
Status string Status of this delegated admin account.
- Account
Id string Account to enable as delegated admin account.
- Relationship
Status string Status of this delegated admin account.
- account
Id String Account to enable as delegated admin account.
- relationship
Status String Status of this delegated admin account.
- account
Id string Account to enable as delegated admin account.
- relationship
Status 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.
- account
Id String Account to enable as delegated admin account.
- relationship
Status String Status of this delegated admin account.
Import
Inspector V2 Delegated Admin Account can be imported using the account_id
, e.g.,
$ 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.