AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the EC2 Image Builder CreateInfrastructureConfiguration API operation.

Syntax

New-EC2IBInfrastructureConfiguration
-Name <String>
-Placement_AvailabilityZone <String>
-Description <String>
-DryRun <Boolean>
-Placement_HostId <String>
-Placement_HostResourceGroupArn <String>
-InstanceMetadataOptions_HttpPutResponseHopLimit <Int32>
-InstanceMetadataOptions_HttpToken <String>
-InstanceProfileName <String>
-InstanceType <String[]>
-KeyPair <String>
-ResourceTag <Hashtable>
-S3Logs_S3BucketName <String>
-S3Logs_S3KeyPrefix <String>
-SecurityGroupId <String[]>
-SnsTopicArn <String>
-SubnetId <String>
-Tag <Hashtable>
-Placement_Tenancy <TenancyType>
-TerminateInstanceOnFailure <Boolean>
-ClientToken <String>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonImagebuilderConfig>

Description

Creates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested.

Parameters

-ClientConfig <AmazonImagebuilderConfig>
Amazon.PowerShell.Cmdlets.EC2IB.AmazonImagebuilderClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ClientToken <String>
A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Description <String>
The description of the infrastructure configuration.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-DryRun <Boolean>
Validates the required permissions and request parameters without performing the operation. If validation succeeds, the operation returns a DryRunOperationException error response.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-InstanceMetadataOptions_HttpPutResponseHopLimit <Int32>
Limit the number of hops that an instance metadata request can traverse to reach its destination. If you don't set a value, the EC2 launch default for the instance applies. If HTTP tokens are required, container image builds need a minimum of two hops.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-InstanceMetadataOptions_HttpToken <String>
Indicates whether a signed token header is required for instance metadata retrieval requests. The values affect the response as follows:
  • required – When you retrieve the IAM role credentials, version 2.0 credentials are returned in all cases.
  • optional – You can include a signed token header in your request to retrieve instance metadata, or you can leave it out. If you include it, version 2.0 credentials are returned for the IAM role. Otherwise, version 1.0 credentials are returned.
If you don't set a value, the EC2 launch default applies to the build and test instances. That default depends on the base AMI and any account-level instance metadata defaults. For more information, see Configure the instance metadata options in the Amazon EC2 User Guide.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInstanceMetadataOptions_HttpTokens
-InstanceProfileName <String>
The instance profile to associate with the instance used to customize your Amazon EC2 AMI. The instance profile must exist in your account.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-InstanceType <String[]>
The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. Image Builder picks one of these instance types based on availability. If you don't specify instance types, Image Builder selects compatible instance types automatically. If you specify a Dedicated Host, Image Builder uses only instance types that the host supports. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInstanceTypes
-KeyPair <String>
The key pair of the infrastructure configuration. You can use this to log on to and debug the instance used to create your image.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Name <String>
The name of the infrastructure configuration. Infrastructure configuration names must be unique to your account in each Amazon Web Services Region. Image Builder generates the infrastructure configuration ARN from a normalized form of the name, so names that differ only in case, spaces, or underscores count as the same name.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-Placement_AvailabilityZone <String>
The Availability Zone where your build and test instances will launch.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Placement_HostId <String>
The ID of the Dedicated Host on which build and test instances run. This only applies if tenancy is host.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Placement_HostResourceGroupArn <String>
The Amazon Resource Name (ARN) of the host resource group in which to launch build and test instances. This only applies if tenancy is host.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Placement_Tenancy <TenancyType>
The tenancy of the instance. An instance with a tenancy of dedicated runs on single-tenant hardware. An instance with a tenancy of host runs on a Dedicated Host.If tenancy is set to host, then you can optionally specify one target for placement – either host ID or host resource group ARN. If automatic placement is enabled for your host, and you don't specify any placement target, Amazon EC2 will try to find an available host for your build and test instances.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ResourceTag <Hashtable>
The metadata tags to assign to the Amazon EC2 instance that Image Builder launches during the build process. Tags are formatted as key value pairs. Tag keys can't begin with aws: or match one of the following reserved keys: CreatedBy, Ec2ImageBuilderArn, Name, or Tags. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesResourceTags
-S3Logs_S3BucketName <String>
The name of an existing Amazon S3 bucket where Image Builder saves build logs. The bucket isn't validated when you create or update the configuration, and Image Builder doesn't create it. The instance profile associated with this infrastructure configuration must have permission to write to the bucket.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesLogging_S3Logs_S3BucketName
-S3Logs_S3KeyPrefix <String>
The Amazon S3 key prefix under which Image Builder writes build and test logs in the bucket.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesLogging_S3Logs_S3KeyPrefix
-SecurityGroupId <String[]>
The security group IDs to associate with the instance used to customize your Amazon EC2 AMI. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSecurityGroupIds
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'InfrastructureConfigurationArn'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.Imagebuilder.Model.CreateInfrastructureConfigurationResponse). Specifying the name of a property of type Amazon.Imagebuilder.Model.CreateInfrastructureConfigurationResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SnsTopicArn <String>
The Amazon Resource Name (ARN) of the SNS topic to which Image Builder sends image build event notifications. Specify a standard topic. Image Builder doesn't support FIFO topics. Image Builder validates the topic when you create or update the configuration. You must have permission to publish to the topic.EC2 Image Builder can't send notifications to SNS topics that are encrypted using keys from other accounts. If your SNS topic is encrypted, the key must be owned by the same account that owns your Image Builder resources.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SubnetId <String>
The subnet ID in which to place the instance used to customize your Amazon EC2 AMI. If you specify subnetId, you must also specify one or more security group IDs in securityGroupIds. Otherwise, the request fails.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Tag <Hashtable>
The metadata tags to assign to the infrastructure configuration resource that Image Builder creates as output. Tags are formatted as key value pairs. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags
-TerminateInstanceOnFailure <Boolean>
Specifies whether to terminate the instance on failure. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails. Defaults to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns a System.String object. The service call response (type Amazon.Imagebuilder.Model.CreateInfrastructureConfigurationResponse) can be returned by specifying '-Select *'.

Supported Version

AWS Tools for PowerShell: 2.x.y.z