github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/identity/v3/users/DeleteBindingDevice.go (about) 1 package users 2 3 import ( 4 golangsdk "github.com/opentelekomcloud/gophertelekomcloud" 5 "github.com/opentelekomcloud/gophertelekomcloud/internal/build" 6 ) 7 8 type UnbindMfaDevice struct { 9 // ID of the user from whom you will unbind the MFA device. 10 UserId string `json:"user_id"` 11 // Administrator: Set this parameter to any value, because verification is not required. 12 // IAM user: Enter the MFA verification code. 13 AuthenticationCode string `json:"authentication_code"` 14 // Serial number of the MFA device. 15 SerialNumber string `json:"serial_number"` 16 } 17 18 func DeleteBindingDevice(client *golangsdk.ServiceClient, opts UnbindMfaDevice) (err error) { 19 b, err := build.RequestBody(opts, "") 20 if err != nil { 21 return 22 } 23 24 // PUT /v3.0/OS-MFA/mfa-devices/unbind 25 _, err = client.Put(v30(client.ServiceURL("OS-MFA", "virtual-mfa-devices", "unbind")), b, nil, &golangsdk.RequestOpts{ 26 OkCodes: []int{204}, 27 }) 28 return 29 }