// VpcAttribute looks up a VPC attribute.
VpcAttribute looks up a VPC attribute.
// VpcAttribute looks up a VPC attribute .
func VpcAttribute(conn *ec2.EC2, vpcID string, attribute string) (*bool, error) {
	input := &ec2.DescribeVpcAttributeInput{
		Attribute: aws.String(attribute),
		VpcId:     aws.String(vpcID),
	}
	output, err := conn.DescribeVpcAttribute(input)
	if err != nil {
		return nil, err
	}
	if output == nil {
		return nil, nil
	}
	switch attribute {
	case ec2.VpcAttributeNameEnableDnsHostnames:
		if output.EnableDnsHostnames == nil {
			return nil, nil
		}
		return output.EnableDnsHostnames.Value, nil
	case ec2.VpcAttributeNameEnableDnsSupport:
		if output.EnableDnsSupport == nil {
			return nil, nil
		}
		return output.EnableDnsSupport.Value, nil
	}
	return nil, fmt.Errorf("unimplemented VPC attribute: %s", attribute)
}
func VpcAttribute ( conn * ec2 . EC2 , vpcID string , attribute string ) ( * bool , error ) { input := & ec2 . DescribeVpcAttributeInput { Attribute : aws . String ( attribute ) , VpcId : aws . String ( vpcID ) , } output , err := conn . DescribeVpcAttribute ( input ) if err != nil { return nil , err } if output == nil { return nil , nil } switch attribute { case ec2 . VpcAttributeNameEnableDnsHostnames : if output . EnableDnsHostnames == nil { return nil , nil } return output . EnableDnsHostnames . Value , nil case ec2 . VpcAttributeNameEnableDnsSupport : if output . EnableDnsSupport == nil { return nil , nil } return output . EnableDnsSupport . Value , nil } return nil , fmt . Errorf ( " " , attribute ) }
VpcAttribute looks up a VPC attribute.
VpcAttribute looks up a VPC attribute .