// Build builds the REST component of a service request. func Build(r *aws.Request) { if r.ParamsFilled() { v := reflect.ValueOf(r.Params).Elem() buildLocationElements(r, v) buildBody(r, v) } }
func populateLocationConstraint(r *aws.Request) { if r.ParamsFilled() && r.Config.Region != "us-east-1" { in := r.Params.(*CreateBucketInput) if in.CreateBucketConfiguration == nil { r.Params = awsutil.CopyOf(r.Params) in = r.Params.(*CreateBucketInput) in.CreateBucketConfiguration = &CreateBucketConfiguration{ LocationConstraint: &r.Config.Region, } } } }