top of page


Public·9 members

Alias [TOP]

An alias is an alternate name or nickname for a cmdlet or for a commandelement, such as a function, script, file, or executable file. You can use thealias instead of the command name in any PowerShell commands.


The aliases that you create are saved only in the current session. To use thealiases in a different session, add the alias to your PowerShell profile. Or,use the Export-Alias cmdlet to save the aliases to a file.

Get-Alias returns only one type of object, an AliasInfo object(System.Management.Automation.AliasInfo). The name of aliases that don'tinclude a hyphen, such as cd are displayed in the following format:

The arrow-based alias name format is not used for aliases that include ahyphen. These are likely to be preferred substitute names for cmdlets andfunctions, instead of typical abbreviations or nicknames, and the author mightnot want them to be as evident.

You can assign an alias to a cmdlet, script, function, or executable file. Youcannot assign an alias to a command and its parameters. For example, you canassign an alias to the Get-Eventlog cmdlet, but you cannot assign an aliasto the Get-Eventlog -LogName System command.

PowerShell aliases are represented by objects that are instances of theSystem.Management.Automation.AliasInfo class. For more information about thistype of object, see AliasInfo Class in the PowerShell SDK.

To view the values of the properties of a specific alias, such as the diralias, get the alias. Then, pipe it to the Format-List cmdlet. For example,the following command gets the dir alias. Next, the command pipes the aliasto the Format-List cmdlet. Then, the command uses the Property parameter ofFormat-List with a wildcard character (*) to display all the properties ofthe dir alias. The following command performs these tasks:

Unlike a CNAME record, you can create an alias record at the top node of a DNS namespace,also known as the zone apex. For example, if you register the DNSname, the zone apex is You can't create a CNAME record, but you can create an alias record for that routes traffic (as long as the record type for is not of typeCNAME).

When you use an alias record to route traffic to an AWS resource, Route 53 automatically recognizes changes in the resource. For example, suppose an alias record for points to an ELB load balancer at If the IP address of the load balancer changes, Route 53 automatically starts to respond to DNS queries using the new IP address.

If an alias record points to an AWS resource, you can't set the time to live (TTL); Route 53 uses the default TTL for the resource. If an alias record points to another record in the same hosted zone, Route 53 uses the TTL of the record that the alias record points to. For more information about the current TTL value for Elastic Load Balancing, go to Request routing in theElastic Load Balancing User Guide and search for "ttl".

For information about creating records by using the Route 53 console, see Creating records by using the Amazon Route 53 console.For information about the values that you specify for alias records, see the applicable topic in Values that you specify when you create or edit Amazon Route 53 records:

For example, you can create an alias record named that redirects queries to an Amazon S3 bucket that is also named You can also create an alias record that redirects queries to a record named in the hosted zone.

In most configurations, you can create an alias record that has the same name as the hosted zone (the zone apex). The one exception is when you want to redirect queries from the zone apex (such as to a record in the same hosted zone that has a type of CNAME (such as The alias record must have the same type as the record you're routing traffic to, and creating a CNAME record for the zone apex isn't supported even for an alias record.

In the response to a dig or nslookup query, an alias record is listed as the record type that you specified when you created the record, such as A or AAAA. (The record type that you specify for an alias record depends on the resource that you're routing traffic to. For example, to route traffic to an S3 bucket, you specify A for the type.)The alias property is visible only in the Route 53 console or in the response to a programmatic request, such as an AWS CLI list-resource-record-sets command.

You can create one or more aliases for your Lambda function. A Lambda alias is like a pointer to a specific function version. Users can access the function version using the alias Amazon Resource Name (ARN).

To see how to declare a function alias in an AWS SAM template, refer to the AWS::Serverless::Function page in the AWS SAM Developer Guide. For information on creating and configuring aliases using AWS CloudFormation, see AWS::Lambda::Alias in the AWS CloudFormation User Guide.

Event sources such as Amazon Simple Storage Service (Amazon S3) invoke your Lambda function. These event sources maintain a mapping that identifies the function to invoke when events occur. If you specify a Lambda function alias in the mapping configuration, you don't need to update the mapping when the function version changes. For more information, see Lambda event source mappings.

In a resource policy, you can grant permissions for event sources to use your Lambda function. If you specify an alias ARN in the policy, you don't need to update the policy when the function version changes.

You can use a resource-based policy to give a service, resource, or account access to your function. The scope of that permission depends on whether you apply it to an alias, a version, or the entire function. For example, if you use an alias name (such as helloworld:PROD), the permission allows you to invoke the helloworld function using the alias ARN (helloworld:PROD).

If you attempt to invoke the function without an alias or a specific version, then you get a permission error. This permission error still occurs even if you attempt to directly invoke the function version associated with the alias.

Use routing configuration on an alias to send a portion of traffic to a second function version. For example, you can reduce the risk of deploying a new version by configuring the alias to send most of the traffic to the existing version, and only a small percentage of traffic to the new version.

Note that Lambda uses a simple probabilistic model to distribute the traffic between the two function versions. At low traffic levels, you might see a high variance between the configured and actual percentage of traffic on each version. If your function uses provisioned concurrency, you can avoid spillover invocations by configuring a higher number of provisioned concurrency instances during the time that alias routing is active.

For Weight (%), enter a weight value for the function. Weight is the percentage of traffic that is assigned to that version when the alias is invoked. The first version receives the residual weight. For example, if you specify 10 percent to Additional version, the first version is assigned 90 percent automatically.

Use the create-alias and update-alias AWS CLI commands to configure the traffic weights between two function versions. When you create or update the alias, you specify the traffic weight in the routing-config parameter.

The following example creates a Lambda function alias named routing-alias that points to version 1 of the function. Version 2 of the function receives 3 percent of the traffic. The remaining 97 percent of traffic is routed to version 1.

The following SQL statement creates two aliases, one for the CustomerName column and one for the ContactName column. Note: It requires double quotation marks or square brackets if the alias name contains spaces:

The following SQL statement selects all the orders from the customer with CustomerID=4 (Around the Horn). We use the "Customers" and "Orders" tables, and give them the table aliases of "c" and "o" respectively (Here we use aliases to make the SQL shorter):

The alias method is used to merge two user identities, effectively connecting two sets of user data as one. This is an advanced method, but it is required to manage user identities successfully in some of our destinations.

This technique can also be very useful in creating commands that you think should exist.For example, to correct the usability problem you encountered with unstaging a file, you can add your own unstage alias to Git:

As you can tell, Git simply replaces the new command with whatever you alias it for.However, maybe you want to run an external command, rather than a Git subcommand.In that case, you start the command with a ! character.This is useful if you write your own tools that work with a Git repository.We can demonstrate by aliasing git visual to run gitk: lets you have multiple aliases associated with a single account, and you can choose which email address you send email from. Creating alternate addresses to use on websites or apps that force you to register can help keep your personal email address out of the hands of marketers and hackers.

Are you sure? If you remove an alias that's an email address from a Microsoft domain (like,,, or, you're permanently deleting the alias and it can't be associated with any Microsoft account again.

After you set up a primary iCloud Mail address, you can create up to three email aliases on After you set up an alias, you can send and receive mail from that alias on and on any device that has Mail turned on in iCloud settings.

You can turn an email alias on or off at any time. You can also delete email aliases that you no longer want to use. While turning off an email alias is temporary, deleting it is permanent. When an alias is turned off or deleted, email sent to that alias is returned to the sender. 041b061a72

  • About

    Welcome to the group! You can connect with other members, ge...

    bottom of page