| 1 |
package ram |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
type AccountAliasResponse struct { |
| 12 |
RamCommonResponse |
| 13 |
AccountAlias string |
| 14 |
} |
| 15 |
|
| 16 |
type PasswordPolicyResponse struct { |
| 17 |
RamCommonResponse |
| 18 |
PasswordPolicy |
| 19 |
} |
| 20 |
|
| 21 |
type PasswordPolicyRequest struct { |
| 22 |
PasswordPolicy |
| 23 |
} |
| 24 |
|
| 25 |
type AccountAliasRequest struct { |
| 26 |
AccountAlias string |
| 27 |
} |
| 28 |
|
| 29 |
func (client *RamClient) SetAccountAlias(accountalias AccountAliasRequest) (RamCommonResponse, error) { |
| 30 |
var resp RamCommonResponse |
| 31 |
err := client.Invoke("SetAccountAlias", accountalias, &resp) |
| 32 |
if err != nil { |
| 33 |
return RamCommonResponse{}, err |
| 34 |
} |
| 35 |
return resp, nil |
| 36 |
} |
| 37 |
|
| 38 |
func (client *RamClient) GetAccountAlias() (AccountAliasResponse, error) { |
| 39 |
var resp AccountAliasResponse |
| 40 |
err := client.Invoke("GetAccountAlias", struct{}{}, &resp) |
| 41 |
if err != nil { |
| 42 |
return AccountAliasResponse{}, err |
| 43 |
} |
| 44 |
return resp, nil |
| 45 |
} |
| 46 |
|
| 47 |
func (client *RamClient) ClearAccountAlias() (RamCommonResponse, error) { |
| 48 |
var resp RamCommonResponse |
| 49 |
err := client.Invoke("ClearAccountAlias", struct{}{}, &resp) |
| 50 |
if err != nil { |
| 51 |
return RamCommonResponse{}, err |
| 52 |
} |
| 53 |
return resp, nil |
| 54 |
} |
| 55 |
|
| 56 |
func (client *RamClient) SetPasswordPolicy(passwordPolicy PasswordPolicyRequest) (PasswordPolicyResponse, error) { |
| 57 |
var resp PasswordPolicyResponse |
| 58 |
err := client.Invoke("SetPasswordPolicy", passwordPolicy, &resp) |
| 59 |
if err != nil { |
| 60 |
return PasswordPolicyResponse{}, err |
| 61 |
} |
| 62 |
return resp, nil |
| 63 |
} |
| 64 |
|
| 65 |
func (client *RamClient) GetPasswordPolicy() (PasswordPolicyResponse, error) { |
| 66 |
var resp PasswordPolicyResponse |
| 67 |
err := client.Invoke("GetPasswordPolicy", struct{}{}, &resp) |
| 68 |
if err != nil { |
| 69 |
return PasswordPolicyResponse{}, err |
| 70 |
} |
| 71 |
return resp, nil |
| 72 |
} |