// resourceAwsLambdaAliasCreate maps to:
// CreateAlias in the API / SDK
resourceAwsLambdaAliasCreate maps to:
CreateAlias in the API / SDK
// resourceAwsLambdaAliasCreate maps to : // CreateAlias in the API / SDK
func resourceAwsLambdaAliasCreate(d *schema.ResourceData, meta interface{}) error {
	conn := meta.(*AWSClient).lambdaconn
	functionName := d.Get("function_name").(string)
	aliasName := d.Get("name").(string)
	log.Printf("[DEBUG] Creating Lambda alias: alias %s for function %s", aliasName, functionName)
	params := &lambda.CreateAliasInput{
		Description:     aws.String(d.Get("description").(string)),
		FunctionName:    aws.String(functionName),
		FunctionVersion: aws.String(d.Get("function_version").(string)),
		Name:            aws.String(aliasName),
		RoutingConfig:   expandLambdaAliasRoutingConfiguration(d.Get("routing_config").([]interface{})),
	}
	aliasConfiguration, err := conn.CreateAlias(params)
	if err != nil {
		return fmt.Errorf("Error creating Lambda alias: %s", err)
	}
	d.SetId(*aliasConfiguration.AliasArn)
	return resourceAwsLambdaAliasRead(d, meta)
}
func resourceAwsLambdaAliasCreate ( d * schema . ResourceData , meta interface { } ) error { conn := meta . ( * AWSClient ) . lambdaconn functionName := d . Get ( " " ) . ( string ) aliasName := d . Get ( " " ) . ( string ) log . Printf ( " " , aliasName , functionName ) params := & lambda . CreateAliasInput { Description : aws . String ( d . Get ( " " ) . ( string ) ) , FunctionName : aws . String ( functionName ) , FunctionVersion : aws . String ( d . Get ( " " ) . ( string ) ) , Name : aws . String ( aliasName ) , RoutingConfig : expandLambdaAliasRoutingConfiguration ( d . Get ( " " ) . ( [ ] interface { } ) ) , } aliasConfiguration , err := conn . CreateAlias ( params ) if err != nil { return fmt . Errorf ( " " , err ) } d . SetId ( * aliasConfiguration . AliasArn ) return resourceAwsLambdaAliasRead ( d , meta ) }
resourceAwsLambdaAliasCreate maps to:
CreateAlias in the API / SDK
resourceAwsLambdaAliasCreate maps to : CreateAlias in the API / SDK