aws.ecr.AccountSetting
Explore with Pulumi AI
Provides a resource to manage AWS ECR Basic Scan Type
Example Usage
Configuring Basic Scanning
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const basicScanTypeVersion = new aws.ecr.AccountSetting("basic_scan_type_version", {
name: "BASIC_SCAN_TYPE_VERSION",
value: "AWS_NATIVE",
});
import pulumi
import pulumi_aws as aws
basic_scan_type_version = aws.ecr.AccountSetting("basic_scan_type_version",
name="BASIC_SCAN_TYPE_VERSION",
value="AWS_NATIVE")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecr.NewAccountSetting(ctx, "basic_scan_type_version", &ecr.AccountSettingArgs{
Name: pulumi.String("BASIC_SCAN_TYPE_VERSION"),
Value: pulumi.String("AWS_NATIVE"),
})
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 basicScanTypeVersion = new Aws.Ecr.AccountSetting("basic_scan_type_version", new()
{
Name = "BASIC_SCAN_TYPE_VERSION",
Value = "AWS_NATIVE",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecr.AccountSetting;
import com.pulumi.aws.ecr.AccountSettingArgs;
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 basicScanTypeVersion = new AccountSetting("basicScanTypeVersion", AccountSettingArgs.builder()
.name("BASIC_SCAN_TYPE_VERSION")
.value("AWS_NATIVE")
.build());
}
}
resources:
basicScanTypeVersion:
type: aws:ecr:AccountSetting
name: basic_scan_type_version
properties:
name: BASIC_SCAN_TYPE_VERSION
value: AWS_NATIVE
Configuring Registry Policy Scope
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const registryPolicyScope = new aws.ecr.AccountSetting("registry_policy_scope", {
name: "REGISTRY_POLICY_SCOPE",
value: "V2",
});
import pulumi
import pulumi_aws as aws
registry_policy_scope = aws.ecr.AccountSetting("registry_policy_scope",
name="REGISTRY_POLICY_SCOPE",
value="V2")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecr.NewAccountSetting(ctx, "registry_policy_scope", &ecr.AccountSettingArgs{
Name: pulumi.String("REGISTRY_POLICY_SCOPE"),
Value: pulumi.String("V2"),
})
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 registryPolicyScope = new Aws.Ecr.AccountSetting("registry_policy_scope", new()
{
Name = "REGISTRY_POLICY_SCOPE",
Value = "V2",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecr.AccountSetting;
import com.pulumi.aws.ecr.AccountSettingArgs;
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 registryPolicyScope = new AccountSetting("registryPolicyScope", AccountSettingArgs.builder()
.name("REGISTRY_POLICY_SCOPE")
.value("V2")
.build());
}
}
resources:
registryPolicyScope:
type: aws:ecr:AccountSetting
name: registry_policy_scope
properties:
name: REGISTRY_POLICY_SCOPE
value: V2
Create AccountSetting Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccountSetting(name: string, args: AccountSettingArgs, opts?: CustomResourceOptions);
@overload
def AccountSetting(resource_name: str,
args: AccountSettingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccountSetting(resource_name: str,
opts: Optional[ResourceOptions] = None,
value: Optional[str] = None,
name: Optional[str] = None)
func NewAccountSetting(ctx *Context, name string, args AccountSettingArgs, opts ...ResourceOption) (*AccountSetting, error)
public AccountSetting(string name, AccountSettingArgs args, CustomResourceOptions? opts = null)
public AccountSetting(String name, AccountSettingArgs args)
public AccountSetting(String name, AccountSettingArgs args, CustomResourceOptions options)
type: aws:ecr:AccountSetting
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccountSettingArgs
- 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 AccountSettingArgs
- 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 AccountSettingArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountSettingArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountSettingArgs
- 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 accountSettingResource = new Aws.Ecr.AccountSetting("accountSettingResource", new()
{
Value = "string",
Name = "string",
});
example, err := ecr.NewAccountSetting(ctx, "accountSettingResource", &ecr.AccountSettingArgs{
Value: pulumi.String("string"),
Name: pulumi.String("string"),
})
var accountSettingResource = new AccountSetting("accountSettingResource", AccountSettingArgs.builder()
.value("string")
.name("string")
.build());
account_setting_resource = aws.ecr.AccountSetting("accountSettingResource",
value="string",
name="string")
const accountSettingResource = new aws.ecr.AccountSetting("accountSettingResource", {
value: "string",
name: "string",
});
type: aws:ecr:AccountSetting
properties:
name: string
value: string
AccountSetting 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 AccountSetting resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the AccountSetting resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing AccountSetting Resource
Get an existing AccountSetting 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?: AccountSettingState, opts?: CustomResourceOptions): AccountSetting
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
value: Optional[str] = None) -> AccountSetting
func GetAccountSetting(ctx *Context, name string, id IDInput, state *AccountSettingState, opts ...ResourceOption) (*AccountSetting, error)
public static AccountSetting Get(string name, Input<string> id, AccountSettingState? state, CustomResourceOptions? opts = null)
public static AccountSetting get(String name, Output<String> id, AccountSettingState 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.
Import
Using pulumi import
, import EMR Security Configurations using the account setting name. For example:
$ pulumi import aws:ecr/accountSetting:AccountSetting foo BASIC_SCAN_TYPE_VERSION
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.