add alicloud secrets engine (#5352)

This commit is contained in:
Becca Petrin
2018-09-19 08:42:28 -07:00
committed by GitHub
parent aca7a78cb7
commit d76e67afc7
121 changed files with 10764 additions and 589 deletions

View File

@@ -7,6 +7,7 @@ import (
"syscall"
ad "github.com/hashicorp/vault-plugin-secrets-ad/plugin"
alicloud "github.com/hashicorp/vault-plugin-secrets-alicloud"
azure "github.com/hashicorp/vault-plugin-secrets-azure"
gcp "github.com/hashicorp/vault-plugin-secrets-gcp/plugin"
kv "github.com/hashicorp/vault-plugin-secrets-kv"
@@ -121,6 +122,7 @@ var (
logicalBackends = map[string]logical.Factory{
"ad": ad.Factory,
"alicloud": alicloud.Factory,
"aws": aws.Factory,
"azure": azure.Factory,
"cassandra": cassandra.Factory,

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// AddUserToGroup invokes the ram.AddUserToGroup API synchronously
// api document: https://help.aliyun.com/api/ram/addusertogroup.html
func (client *Client) AddUserToGroup(request *AddUserToGroupRequest) (response *AddUserToGroupResponse, err error) {
response = CreateAddUserToGroupResponse()
err = client.DoAction(request, response)
return
}
// AddUserToGroupWithChan invokes the ram.AddUserToGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/addusertogroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) AddUserToGroupWithChan(request *AddUserToGroupRequest) (<-chan *AddUserToGroupResponse, <-chan error) {
responseChan := make(chan *AddUserToGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.AddUserToGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// AddUserToGroupWithCallback invokes the ram.AddUserToGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/addusertogroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) AddUserToGroupWithCallback(request *AddUserToGroupRequest, callback func(response *AddUserToGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *AddUserToGroupResponse
var err error
defer close(result)
response, err = client.AddUserToGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// AddUserToGroupRequest is the request struct for api AddUserToGroup
type AddUserToGroupRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
GroupName string `position:"Query" name:"GroupName"`
}
// AddUserToGroupResponse is the response struct for api AddUserToGroup
type AddUserToGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateAddUserToGroupRequest creates a request to invoke AddUserToGroup API
func CreateAddUserToGroupRequest() (request *AddUserToGroupRequest) {
request = &AddUserToGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "AddUserToGroup", "", "")
return
}
// CreateAddUserToGroupResponse creates a response to parse from AddUserToGroup response
func CreateAddUserToGroupResponse() (response *AddUserToGroupResponse) {
response = &AddUserToGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// AttachPolicyToGroup invokes the ram.AttachPolicyToGroup API synchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytogroup.html
func (client *Client) AttachPolicyToGroup(request *AttachPolicyToGroupRequest) (response *AttachPolicyToGroupResponse, err error) {
response = CreateAttachPolicyToGroupResponse()
err = client.DoAction(request, response)
return
}
// AttachPolicyToGroupWithChan invokes the ram.AttachPolicyToGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytogroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) AttachPolicyToGroupWithChan(request *AttachPolicyToGroupRequest) (<-chan *AttachPolicyToGroupResponse, <-chan error) {
responseChan := make(chan *AttachPolicyToGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.AttachPolicyToGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// AttachPolicyToGroupWithCallback invokes the ram.AttachPolicyToGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytogroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) AttachPolicyToGroupWithCallback(request *AttachPolicyToGroupRequest, callback func(response *AttachPolicyToGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *AttachPolicyToGroupResponse
var err error
defer close(result)
response, err = client.AttachPolicyToGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// AttachPolicyToGroupRequest is the request struct for api AttachPolicyToGroup
type AttachPolicyToGroupRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
GroupName string `position:"Query" name:"GroupName"`
}
// AttachPolicyToGroupResponse is the response struct for api AttachPolicyToGroup
type AttachPolicyToGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateAttachPolicyToGroupRequest creates a request to invoke AttachPolicyToGroup API
func CreateAttachPolicyToGroupRequest() (request *AttachPolicyToGroupRequest) {
request = &AttachPolicyToGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToGroup", "", "")
return
}
// CreateAttachPolicyToGroupResponse creates a response to parse from AttachPolicyToGroup response
func CreateAttachPolicyToGroupResponse() (response *AttachPolicyToGroupResponse) {
response = &AttachPolicyToGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// AttachPolicyToRole invokes the ram.AttachPolicyToRole API synchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytorole.html
func (client *Client) AttachPolicyToRole(request *AttachPolicyToRoleRequest) (response *AttachPolicyToRoleResponse, err error) {
response = CreateAttachPolicyToRoleResponse()
err = client.DoAction(request, response)
return
}
// AttachPolicyToRoleWithChan invokes the ram.AttachPolicyToRole API asynchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytorole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) AttachPolicyToRoleWithChan(request *AttachPolicyToRoleRequest) (<-chan *AttachPolicyToRoleResponse, <-chan error) {
responseChan := make(chan *AttachPolicyToRoleResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.AttachPolicyToRole(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// AttachPolicyToRoleWithCallback invokes the ram.AttachPolicyToRole API asynchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytorole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) AttachPolicyToRoleWithCallback(request *AttachPolicyToRoleRequest, callback func(response *AttachPolicyToRoleResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *AttachPolicyToRoleResponse
var err error
defer close(result)
response, err = client.AttachPolicyToRole(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// AttachPolicyToRoleRequest is the request struct for api AttachPolicyToRole
type AttachPolicyToRoleRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
RoleName string `position:"Query" name:"RoleName"`
}
// AttachPolicyToRoleResponse is the response struct for api AttachPolicyToRole
type AttachPolicyToRoleResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateAttachPolicyToRoleRequest creates a request to invoke AttachPolicyToRole API
func CreateAttachPolicyToRoleRequest() (request *AttachPolicyToRoleRequest) {
request = &AttachPolicyToRoleRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToRole", "", "")
return
}
// CreateAttachPolicyToRoleResponse creates a response to parse from AttachPolicyToRole response
func CreateAttachPolicyToRoleResponse() (response *AttachPolicyToRoleResponse) {
response = &AttachPolicyToRoleResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// AttachPolicyToUser invokes the ram.AttachPolicyToUser API synchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytouser.html
func (client *Client) AttachPolicyToUser(request *AttachPolicyToUserRequest) (response *AttachPolicyToUserResponse, err error) {
response = CreateAttachPolicyToUserResponse()
err = client.DoAction(request, response)
return
}
// AttachPolicyToUserWithChan invokes the ram.AttachPolicyToUser API asynchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytouser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) AttachPolicyToUserWithChan(request *AttachPolicyToUserRequest) (<-chan *AttachPolicyToUserResponse, <-chan error) {
responseChan := make(chan *AttachPolicyToUserResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.AttachPolicyToUser(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// AttachPolicyToUserWithCallback invokes the ram.AttachPolicyToUser API asynchronously
// api document: https://help.aliyun.com/api/ram/attachpolicytouser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) AttachPolicyToUserWithCallback(request *AttachPolicyToUserRequest, callback func(response *AttachPolicyToUserResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *AttachPolicyToUserResponse
var err error
defer close(result)
response, err = client.AttachPolicyToUser(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// AttachPolicyToUserRequest is the request struct for api AttachPolicyToUser
type AttachPolicyToUserRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
UserName string `position:"Query" name:"UserName"`
}
// AttachPolicyToUserResponse is the response struct for api AttachPolicyToUser
type AttachPolicyToUserResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateAttachPolicyToUserRequest creates a request to invoke AttachPolicyToUser API
func CreateAttachPolicyToUserRequest() (request *AttachPolicyToUserRequest) {
request = &AttachPolicyToUserRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "AttachPolicyToUser", "", "")
return
}
// CreateAttachPolicyToUserResponse creates a response to parse from AttachPolicyToUser response
func CreateAttachPolicyToUserResponse() (response *AttachPolicyToUserResponse) {
response = &AttachPolicyToUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,106 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// BindMFADevice invokes the ram.BindMFADevice API synchronously
// api document: https://help.aliyun.com/api/ram/bindmfadevice.html
func (client *Client) BindMFADevice(request *BindMFADeviceRequest) (response *BindMFADeviceResponse, err error) {
response = CreateBindMFADeviceResponse()
err = client.DoAction(request, response)
return
}
// BindMFADeviceWithChan invokes the ram.BindMFADevice API asynchronously
// api document: https://help.aliyun.com/api/ram/bindmfadevice.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) BindMFADeviceWithChan(request *BindMFADeviceRequest) (<-chan *BindMFADeviceResponse, <-chan error) {
responseChan := make(chan *BindMFADeviceResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.BindMFADevice(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// BindMFADeviceWithCallback invokes the ram.BindMFADevice API asynchronously
// api document: https://help.aliyun.com/api/ram/bindmfadevice.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) BindMFADeviceWithCallback(request *BindMFADeviceRequest, callback func(response *BindMFADeviceResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *BindMFADeviceResponse
var err error
defer close(result)
response, err = client.BindMFADevice(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// BindMFADeviceRequest is the request struct for api BindMFADevice
type BindMFADeviceRequest struct {
*requests.RpcRequest
SerialNumber string `position:"Query" name:"SerialNumber"`
UserName string `position:"Query" name:"UserName"`
AuthenticationCode1 string `position:"Query" name:"AuthenticationCode1"`
AuthenticationCode2 string `position:"Query" name:"AuthenticationCode2"`
}
// BindMFADeviceResponse is the response struct for api BindMFADevice
type BindMFADeviceResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateBindMFADeviceRequest creates a request to invoke BindMFADevice API
func CreateBindMFADeviceRequest() (request *BindMFADeviceRequest) {
request = &BindMFADeviceRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "BindMFADevice", "", "")
return
}
// CreateBindMFADeviceResponse creates a response to parse from BindMFADevice response
func CreateBindMFADeviceResponse() (response *BindMFADeviceResponse) {
response = &BindMFADeviceResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ChangePassword invokes the ram.ChangePassword API synchronously
// api document: https://help.aliyun.com/api/ram/changepassword.html
func (client *Client) ChangePassword(request *ChangePasswordRequest) (response *ChangePasswordResponse, err error) {
response = CreateChangePasswordResponse()
err = client.DoAction(request, response)
return
}
// ChangePasswordWithChan invokes the ram.ChangePassword API asynchronously
// api document: https://help.aliyun.com/api/ram/changepassword.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ChangePasswordWithChan(request *ChangePasswordRequest) (<-chan *ChangePasswordResponse, <-chan error) {
responseChan := make(chan *ChangePasswordResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ChangePassword(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ChangePasswordWithCallback invokes the ram.ChangePassword API asynchronously
// api document: https://help.aliyun.com/api/ram/changepassword.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ChangePasswordWithCallback(request *ChangePasswordRequest, callback func(response *ChangePasswordResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ChangePasswordResponse
var err error
defer close(result)
response, err = client.ChangePassword(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ChangePasswordRequest is the request struct for api ChangePassword
type ChangePasswordRequest struct {
*requests.RpcRequest
OldPassword string `position:"Query" name:"OldPassword"`
NewPassword string `position:"Query" name:"NewPassword"`
}
// ChangePasswordResponse is the response struct for api ChangePassword
type ChangePasswordResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateChangePasswordRequest creates a request to invoke ChangePassword API
func CreateChangePasswordRequest() (request *ChangePasswordRequest) {
request = &ChangePasswordRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ChangePassword", "", "")
return
}
// CreateChangePasswordResponse creates a response to parse from ChangePassword response
func CreateChangePasswordResponse() (response *ChangePasswordResponse) {
response = &ChangePasswordResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,102 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ClearAccountAlias invokes the ram.ClearAccountAlias API synchronously
// api document: https://help.aliyun.com/api/ram/clearaccountalias.html
func (client *Client) ClearAccountAlias(request *ClearAccountAliasRequest) (response *ClearAccountAliasResponse, err error) {
response = CreateClearAccountAliasResponse()
err = client.DoAction(request, response)
return
}
// ClearAccountAliasWithChan invokes the ram.ClearAccountAlias API asynchronously
// api document: https://help.aliyun.com/api/ram/clearaccountalias.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ClearAccountAliasWithChan(request *ClearAccountAliasRequest) (<-chan *ClearAccountAliasResponse, <-chan error) {
responseChan := make(chan *ClearAccountAliasResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ClearAccountAlias(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ClearAccountAliasWithCallback invokes the ram.ClearAccountAlias API asynchronously
// api document: https://help.aliyun.com/api/ram/clearaccountalias.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ClearAccountAliasWithCallback(request *ClearAccountAliasRequest, callback func(response *ClearAccountAliasResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ClearAccountAliasResponse
var err error
defer close(result)
response, err = client.ClearAccountAlias(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ClearAccountAliasRequest is the request struct for api ClearAccountAlias
type ClearAccountAliasRequest struct {
*requests.RpcRequest
}
// ClearAccountAliasResponse is the response struct for api ClearAccountAlias
type ClearAccountAliasResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateClearAccountAliasRequest creates a request to invoke ClearAccountAlias API
func CreateClearAccountAliasRequest() (request *ClearAccountAliasRequest) {
request = &ClearAccountAliasRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ClearAccountAlias", "", "")
return
}
// CreateClearAccountAliasResponse creates a response to parse from ClearAccountAlias response
func CreateClearAccountAliasResponse() (response *ClearAccountAliasResponse) {
response = &ClearAccountAliasResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,81 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth"
)
// Client is the sdk client struct, each func corresponds to an OpenAPI
type Client struct {
sdk.Client
}
// NewClient creates a sdk client with environment variables
func NewClient() (client *Client, err error) {
client = &Client{}
err = client.Init()
return
}
// NewClientWithOptions creates a sdk client with regionId/sdkConfig/credential
// this is the common api to create a sdk client
func NewClientWithOptions(regionId string, config *sdk.Config, credential auth.Credential) (client *Client, err error) {
client = &Client{}
err = client.InitWithOptions(regionId, config, credential)
return
}
// NewClientWithAccessKey is a shortcut to create sdk client with accesskey
// usage: https://help.aliyun.com/document_detail/66217.html
func NewClientWithAccessKey(regionId, accessKeyId, accessKeySecret string) (client *Client, err error) {
client = &Client{}
err = client.InitWithAccessKey(regionId, accessKeyId, accessKeySecret)
return
}
// NewClientWithStsToken is a shortcut to create sdk client with sts token
// usage: https://help.aliyun.com/document_detail/66222.html
func NewClientWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken string) (client *Client, err error) {
client = &Client{}
err = client.InitWithStsToken(regionId, stsAccessKeyId, stsAccessKeySecret, stsToken)
return
}
// NewClientWithRamRoleArn is a shortcut to create sdk client with ram roleArn
// usage: https://help.aliyun.com/document_detail/66222.html
func NewClientWithRamRoleArn(regionId string, accessKeyId, accessKeySecret, roleArn, roleSessionName string) (client *Client, err error) {
client = &Client{}
err = client.InitWithRamRoleArn(regionId, accessKeyId, accessKeySecret, roleArn, roleSessionName)
return
}
// NewClientWithEcsRamRole is a shortcut to create sdk client with ecs ram role
// usage: https://help.aliyun.com/document_detail/66223.html
func NewClientWithEcsRamRole(regionId string, roleName string) (client *Client, err error) {
client = &Client{}
err = client.InitWithEcsRamRole(regionId, roleName)
return
}
// NewClientWithRsaKeyPair is a shortcut to create sdk client with rsa key pair
// attention: rsa key pair auth is only Japan regions available
func NewClientWithRsaKeyPair(regionId string, publicKeyId, privateKey string, sessionExpiration int) (client *Client, err error) {
client = &Client{}
err = client.InitWithRsaKeyPair(regionId, publicKeyId, privateKey, sessionExpiration)
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// CreateAccessKey invokes the ram.CreateAccessKey API synchronously
// api document: https://help.aliyun.com/api/ram/createaccesskey.html
func (client *Client) CreateAccessKey(request *CreateAccessKeyRequest) (response *CreateAccessKeyResponse, err error) {
response = CreateCreateAccessKeyResponse()
err = client.DoAction(request, response)
return
}
// CreateAccessKeyWithChan invokes the ram.CreateAccessKey API asynchronously
// api document: https://help.aliyun.com/api/ram/createaccesskey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateAccessKeyWithChan(request *CreateAccessKeyRequest) (<-chan *CreateAccessKeyResponse, <-chan error) {
responseChan := make(chan *CreateAccessKeyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.CreateAccessKey(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// CreateAccessKeyWithCallback invokes the ram.CreateAccessKey API asynchronously
// api document: https://help.aliyun.com/api/ram/createaccesskey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateAccessKeyWithCallback(request *CreateAccessKeyRequest, callback func(response *CreateAccessKeyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *CreateAccessKeyResponse
var err error
defer close(result)
response, err = client.CreateAccessKey(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// CreateAccessKeyRequest is the request struct for api CreateAccessKey
type CreateAccessKeyRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// CreateAccessKeyResponse is the response struct for api CreateAccessKey
type CreateAccessKeyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
AccessKey AccessKey `json:"AccessKey" xml:"AccessKey"`
}
// CreateCreateAccessKeyRequest creates a request to invoke CreateAccessKey API
func CreateCreateAccessKeyRequest() (request *CreateAccessKeyRequest) {
request = &CreateAccessKeyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "CreateAccessKey", "", "")
return
}
// CreateCreateAccessKeyResponse creates a response to parse from CreateAccessKey response
func CreateCreateAccessKeyResponse() (response *CreateAccessKeyResponse) {
response = &CreateAccessKeyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// CreateGroup invokes the ram.CreateGroup API synchronously
// api document: https://help.aliyun.com/api/ram/creategroup.html
func (client *Client) CreateGroup(request *CreateGroupRequest) (response *CreateGroupResponse, err error) {
response = CreateCreateGroupResponse()
err = client.DoAction(request, response)
return
}
// CreateGroupWithChan invokes the ram.CreateGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/creategroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateGroupWithChan(request *CreateGroupRequest) (<-chan *CreateGroupResponse, <-chan error) {
responseChan := make(chan *CreateGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.CreateGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// CreateGroupWithCallback invokes the ram.CreateGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/creategroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateGroupWithCallback(request *CreateGroupRequest, callback func(response *CreateGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *CreateGroupResponse
var err error
defer close(result)
response, err = client.CreateGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// CreateGroupRequest is the request struct for api CreateGroup
type CreateGroupRequest struct {
*requests.RpcRequest
GroupName string `position:"Query" name:"GroupName"`
Comments string `position:"Query" name:"Comments"`
}
// CreateGroupResponse is the response struct for api CreateGroup
type CreateGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Group Group `json:"Group" xml:"Group"`
}
// CreateCreateGroupRequest creates a request to invoke CreateGroup API
func CreateCreateGroupRequest() (request *CreateGroupRequest) {
request = &CreateGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "CreateGroup", "", "")
return
}
// CreateCreateGroupResponse creates a response to parse from CreateGroup response
func CreateCreateGroupResponse() (response *CreateGroupResponse) {
response = &CreateGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,107 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// CreateLoginProfile invokes the ram.CreateLoginProfile API synchronously
// api document: https://help.aliyun.com/api/ram/createloginprofile.html
func (client *Client) CreateLoginProfile(request *CreateLoginProfileRequest) (response *CreateLoginProfileResponse, err error) {
response = CreateCreateLoginProfileResponse()
err = client.DoAction(request, response)
return
}
// CreateLoginProfileWithChan invokes the ram.CreateLoginProfile API asynchronously
// api document: https://help.aliyun.com/api/ram/createloginprofile.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateLoginProfileWithChan(request *CreateLoginProfileRequest) (<-chan *CreateLoginProfileResponse, <-chan error) {
responseChan := make(chan *CreateLoginProfileResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.CreateLoginProfile(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// CreateLoginProfileWithCallback invokes the ram.CreateLoginProfile API asynchronously
// api document: https://help.aliyun.com/api/ram/createloginprofile.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateLoginProfileWithCallback(request *CreateLoginProfileRequest, callback func(response *CreateLoginProfileResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *CreateLoginProfileResponse
var err error
defer close(result)
response, err = client.CreateLoginProfile(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// CreateLoginProfileRequest is the request struct for api CreateLoginProfile
type CreateLoginProfileRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
Password string `position:"Query" name:"Password"`
PasswordResetRequired requests.Boolean `position:"Query" name:"PasswordResetRequired"`
MFABindRequired requests.Boolean `position:"Query" name:"MFABindRequired"`
}
// CreateLoginProfileResponse is the response struct for api CreateLoginProfile
type CreateLoginProfileResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
LoginProfile LoginProfile `json:"LoginProfile" xml:"LoginProfile"`
}
// CreateCreateLoginProfileRequest creates a request to invoke CreateLoginProfile API
func CreateCreateLoginProfileRequest() (request *CreateLoginProfileRequest) {
request = &CreateLoginProfileRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "CreateLoginProfile", "", "")
return
}
// CreateCreateLoginProfileResponse creates a response to parse from CreateLoginProfile response
func CreateCreateLoginProfileResponse() (response *CreateLoginProfileResponse) {
response = &CreateLoginProfileResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,106 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// CreatePolicy invokes the ram.CreatePolicy API synchronously
// api document: https://help.aliyun.com/api/ram/createpolicy.html
func (client *Client) CreatePolicy(request *CreatePolicyRequest) (response *CreatePolicyResponse, err error) {
response = CreateCreatePolicyResponse()
err = client.DoAction(request, response)
return
}
// CreatePolicyWithChan invokes the ram.CreatePolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/createpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreatePolicyWithChan(request *CreatePolicyRequest) (<-chan *CreatePolicyResponse, <-chan error) {
responseChan := make(chan *CreatePolicyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.CreatePolicy(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// CreatePolicyWithCallback invokes the ram.CreatePolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/createpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreatePolicyWithCallback(request *CreatePolicyRequest, callback func(response *CreatePolicyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *CreatePolicyResponse
var err error
defer close(result)
response, err = client.CreatePolicy(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// CreatePolicyRequest is the request struct for api CreatePolicy
type CreatePolicyRequest struct {
*requests.RpcRequest
PolicyName string `position:"Query" name:"PolicyName"`
Description string `position:"Query" name:"Description"`
PolicyDocument string `position:"Query" name:"PolicyDocument"`
}
// CreatePolicyResponse is the response struct for api CreatePolicy
type CreatePolicyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Policy Policy `json:"Policy" xml:"Policy"`
}
// CreateCreatePolicyRequest creates a request to invoke CreatePolicy API
func CreateCreatePolicyRequest() (request *CreatePolicyRequest) {
request = &CreatePolicyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "CreatePolicy", "", "")
return
}
// CreateCreatePolicyResponse creates a response to parse from CreatePolicy response
func CreateCreatePolicyResponse() (response *CreatePolicyResponse) {
response = &CreatePolicyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,106 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// CreatePolicyVersion invokes the ram.CreatePolicyVersion API synchronously
// api document: https://help.aliyun.com/api/ram/createpolicyversion.html
func (client *Client) CreatePolicyVersion(request *CreatePolicyVersionRequest) (response *CreatePolicyVersionResponse, err error) {
response = CreateCreatePolicyVersionResponse()
err = client.DoAction(request, response)
return
}
// CreatePolicyVersionWithChan invokes the ram.CreatePolicyVersion API asynchronously
// api document: https://help.aliyun.com/api/ram/createpolicyversion.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreatePolicyVersionWithChan(request *CreatePolicyVersionRequest) (<-chan *CreatePolicyVersionResponse, <-chan error) {
responseChan := make(chan *CreatePolicyVersionResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.CreatePolicyVersion(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// CreatePolicyVersionWithCallback invokes the ram.CreatePolicyVersion API asynchronously
// api document: https://help.aliyun.com/api/ram/createpolicyversion.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreatePolicyVersionWithCallback(request *CreatePolicyVersionRequest, callback func(response *CreatePolicyVersionResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *CreatePolicyVersionResponse
var err error
defer close(result)
response, err = client.CreatePolicyVersion(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// CreatePolicyVersionRequest is the request struct for api CreatePolicyVersion
type CreatePolicyVersionRequest struct {
*requests.RpcRequest
PolicyName string `position:"Query" name:"PolicyName"`
PolicyDocument string `position:"Query" name:"PolicyDocument"`
SetAsDefault requests.Boolean `position:"Query" name:"SetAsDefault"`
}
// CreatePolicyVersionResponse is the response struct for api CreatePolicyVersion
type CreatePolicyVersionResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
PolicyVersion PolicyVersion `json:"PolicyVersion" xml:"PolicyVersion"`
}
// CreateCreatePolicyVersionRequest creates a request to invoke CreatePolicyVersion API
func CreateCreatePolicyVersionRequest() (request *CreatePolicyVersionRequest) {
request = &CreatePolicyVersionRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "CreatePolicyVersion", "", "")
return
}
// CreateCreatePolicyVersionResponse creates a response to parse from CreatePolicyVersion response
func CreateCreatePolicyVersionResponse() (response *CreatePolicyVersionResponse) {
response = &CreatePolicyVersionResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,106 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// CreateRole invokes the ram.CreateRole API synchronously
// api document: https://help.aliyun.com/api/ram/createrole.html
func (client *Client) CreateRole(request *CreateRoleRequest) (response *CreateRoleResponse, err error) {
response = CreateCreateRoleResponse()
err = client.DoAction(request, response)
return
}
// CreateRoleWithChan invokes the ram.CreateRole API asynchronously
// api document: https://help.aliyun.com/api/ram/createrole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateRoleWithChan(request *CreateRoleRequest) (<-chan *CreateRoleResponse, <-chan error) {
responseChan := make(chan *CreateRoleResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.CreateRole(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// CreateRoleWithCallback invokes the ram.CreateRole API asynchronously
// api document: https://help.aliyun.com/api/ram/createrole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateRoleWithCallback(request *CreateRoleRequest, callback func(response *CreateRoleResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *CreateRoleResponse
var err error
defer close(result)
response, err = client.CreateRole(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// CreateRoleRequest is the request struct for api CreateRole
type CreateRoleRequest struct {
*requests.RpcRequest
RoleName string `position:"Query" name:"RoleName"`
Description string `position:"Query" name:"Description"`
AssumeRolePolicyDocument string `position:"Query" name:"AssumeRolePolicyDocument"`
}
// CreateRoleResponse is the response struct for api CreateRole
type CreateRoleResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Role Role `json:"Role" xml:"Role"`
}
// CreateCreateRoleRequest creates a request to invoke CreateRole API
func CreateCreateRoleRequest() (request *CreateRoleRequest) {
request = &CreateRoleRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "CreateRole", "", "")
return
}
// CreateCreateRoleResponse creates a response to parse from CreateRole response
func CreateCreateRoleResponse() (response *CreateRoleResponse) {
response = &CreateRoleResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,108 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// CreateUser invokes the ram.CreateUser API synchronously
// api document: https://help.aliyun.com/api/ram/createuser.html
func (client *Client) CreateUser(request *CreateUserRequest) (response *CreateUserResponse, err error) {
response = CreateCreateUserResponse()
err = client.DoAction(request, response)
return
}
// CreateUserWithChan invokes the ram.CreateUser API asynchronously
// api document: https://help.aliyun.com/api/ram/createuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateUserWithChan(request *CreateUserRequest) (<-chan *CreateUserResponse, <-chan error) {
responseChan := make(chan *CreateUserResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.CreateUser(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// CreateUserWithCallback invokes the ram.CreateUser API asynchronously
// api document: https://help.aliyun.com/api/ram/createuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateUserWithCallback(request *CreateUserRequest, callback func(response *CreateUserResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *CreateUserResponse
var err error
defer close(result)
response, err = client.CreateUser(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// CreateUserRequest is the request struct for api CreateUser
type CreateUserRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
DisplayName string `position:"Query" name:"DisplayName"`
MobilePhone string `position:"Query" name:"MobilePhone"`
Email string `position:"Query" name:"Email"`
Comments string `position:"Query" name:"Comments"`
}
// CreateUserResponse is the response struct for api CreateUser
type CreateUserResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
User User `json:"User" xml:"User"`
}
// CreateCreateUserRequest creates a request to invoke CreateUser API
func CreateCreateUserRequest() (request *CreateUserRequest) {
request = &CreateUserRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "CreateUser", "", "")
return
}
// CreateCreateUserResponse creates a response to parse from CreateUser response
func CreateCreateUserResponse() (response *CreateUserResponse) {
response = &CreateUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// CreateVirtualMFADevice invokes the ram.CreateVirtualMFADevice API synchronously
// api document: https://help.aliyun.com/api/ram/createvirtualmfadevice.html
func (client *Client) CreateVirtualMFADevice(request *CreateVirtualMFADeviceRequest) (response *CreateVirtualMFADeviceResponse, err error) {
response = CreateCreateVirtualMFADeviceResponse()
err = client.DoAction(request, response)
return
}
// CreateVirtualMFADeviceWithChan invokes the ram.CreateVirtualMFADevice API asynchronously
// api document: https://help.aliyun.com/api/ram/createvirtualmfadevice.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateVirtualMFADeviceWithChan(request *CreateVirtualMFADeviceRequest) (<-chan *CreateVirtualMFADeviceResponse, <-chan error) {
responseChan := make(chan *CreateVirtualMFADeviceResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.CreateVirtualMFADevice(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// CreateVirtualMFADeviceWithCallback invokes the ram.CreateVirtualMFADevice API asynchronously
// api document: https://help.aliyun.com/api/ram/createvirtualmfadevice.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) CreateVirtualMFADeviceWithCallback(request *CreateVirtualMFADeviceRequest, callback func(response *CreateVirtualMFADeviceResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *CreateVirtualMFADeviceResponse
var err error
defer close(result)
response, err = client.CreateVirtualMFADevice(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// CreateVirtualMFADeviceRequest is the request struct for api CreateVirtualMFADevice
type CreateVirtualMFADeviceRequest struct {
*requests.RpcRequest
VirtualMFADeviceName string `position:"Query" name:"VirtualMFADeviceName"`
}
// CreateVirtualMFADeviceResponse is the response struct for api CreateVirtualMFADevice
type CreateVirtualMFADeviceResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
VirtualMFADevice VirtualMFADevice `json:"VirtualMFADevice" xml:"VirtualMFADevice"`
}
// CreateCreateVirtualMFADeviceRequest creates a request to invoke CreateVirtualMFADevice API
func CreateCreateVirtualMFADeviceRequest() (request *CreateVirtualMFADeviceRequest) {
request = &CreateVirtualMFADeviceRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "CreateVirtualMFADevice", "", "")
return
}
// CreateCreateVirtualMFADeviceResponse creates a response to parse from CreateVirtualMFADevice response
func CreateCreateVirtualMFADeviceResponse() (response *CreateVirtualMFADeviceResponse) {
response = &CreateVirtualMFADeviceResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeleteAccessKey invokes the ram.DeleteAccessKey API synchronously
// api document: https://help.aliyun.com/api/ram/deleteaccesskey.html
func (client *Client) DeleteAccessKey(request *DeleteAccessKeyRequest) (response *DeleteAccessKeyResponse, err error) {
response = CreateDeleteAccessKeyResponse()
err = client.DoAction(request, response)
return
}
// DeleteAccessKeyWithChan invokes the ram.DeleteAccessKey API asynchronously
// api document: https://help.aliyun.com/api/ram/deleteaccesskey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteAccessKeyWithChan(request *DeleteAccessKeyRequest) (<-chan *DeleteAccessKeyResponse, <-chan error) {
responseChan := make(chan *DeleteAccessKeyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeleteAccessKey(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeleteAccessKeyWithCallback invokes the ram.DeleteAccessKey API asynchronously
// api document: https://help.aliyun.com/api/ram/deleteaccesskey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteAccessKeyWithCallback(request *DeleteAccessKeyRequest, callback func(response *DeleteAccessKeyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeleteAccessKeyResponse
var err error
defer close(result)
response, err = client.DeleteAccessKey(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeleteAccessKeyRequest is the request struct for api DeleteAccessKey
type DeleteAccessKeyRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
UserAccessKeyId string `position:"Query" name:"UserAccessKeyId"`
}
// DeleteAccessKeyResponse is the response struct for api DeleteAccessKey
type DeleteAccessKeyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeleteAccessKeyRequest creates a request to invoke DeleteAccessKey API
func CreateDeleteAccessKeyRequest() (request *DeleteAccessKeyRequest) {
request = &DeleteAccessKeyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeleteAccessKey", "", "")
return
}
// CreateDeleteAccessKeyResponse creates a response to parse from DeleteAccessKey response
func CreateDeleteAccessKeyResponse() (response *DeleteAccessKeyResponse) {
response = &DeleteAccessKeyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeleteGroup invokes the ram.DeleteGroup API synchronously
// api document: https://help.aliyun.com/api/ram/deletegroup.html
func (client *Client) DeleteGroup(request *DeleteGroupRequest) (response *DeleteGroupResponse, err error) {
response = CreateDeleteGroupResponse()
err = client.DoAction(request, response)
return
}
// DeleteGroupWithChan invokes the ram.DeleteGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/deletegroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteGroupWithChan(request *DeleteGroupRequest) (<-chan *DeleteGroupResponse, <-chan error) {
responseChan := make(chan *DeleteGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeleteGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeleteGroupWithCallback invokes the ram.DeleteGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/deletegroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteGroupWithCallback(request *DeleteGroupRequest, callback func(response *DeleteGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeleteGroupResponse
var err error
defer close(result)
response, err = client.DeleteGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeleteGroupRequest is the request struct for api DeleteGroup
type DeleteGroupRequest struct {
*requests.RpcRequest
GroupName string `position:"Query" name:"GroupName"`
}
// DeleteGroupResponse is the response struct for api DeleteGroup
type DeleteGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeleteGroupRequest creates a request to invoke DeleteGroup API
func CreateDeleteGroupRequest() (request *DeleteGroupRequest) {
request = &DeleteGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeleteGroup", "", "")
return
}
// CreateDeleteGroupResponse creates a response to parse from DeleteGroup response
func CreateDeleteGroupResponse() (response *DeleteGroupResponse) {
response = &DeleteGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeleteLoginProfile invokes the ram.DeleteLoginProfile API synchronously
// api document: https://help.aliyun.com/api/ram/deleteloginprofile.html
func (client *Client) DeleteLoginProfile(request *DeleteLoginProfileRequest) (response *DeleteLoginProfileResponse, err error) {
response = CreateDeleteLoginProfileResponse()
err = client.DoAction(request, response)
return
}
// DeleteLoginProfileWithChan invokes the ram.DeleteLoginProfile API asynchronously
// api document: https://help.aliyun.com/api/ram/deleteloginprofile.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteLoginProfileWithChan(request *DeleteLoginProfileRequest) (<-chan *DeleteLoginProfileResponse, <-chan error) {
responseChan := make(chan *DeleteLoginProfileResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeleteLoginProfile(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeleteLoginProfileWithCallback invokes the ram.DeleteLoginProfile API asynchronously
// api document: https://help.aliyun.com/api/ram/deleteloginprofile.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteLoginProfileWithCallback(request *DeleteLoginProfileRequest, callback func(response *DeleteLoginProfileResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeleteLoginProfileResponse
var err error
defer close(result)
response, err = client.DeleteLoginProfile(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeleteLoginProfileRequest is the request struct for api DeleteLoginProfile
type DeleteLoginProfileRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// DeleteLoginProfileResponse is the response struct for api DeleteLoginProfile
type DeleteLoginProfileResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeleteLoginProfileRequest creates a request to invoke DeleteLoginProfile API
func CreateDeleteLoginProfileRequest() (request *DeleteLoginProfileRequest) {
request = &DeleteLoginProfileRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeleteLoginProfile", "", "")
return
}
// CreateDeleteLoginProfileResponse creates a response to parse from DeleteLoginProfile response
func CreateDeleteLoginProfileResponse() (response *DeleteLoginProfileResponse) {
response = &DeleteLoginProfileResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeletePolicy invokes the ram.DeletePolicy API synchronously
// api document: https://help.aliyun.com/api/ram/deletepolicy.html
func (client *Client) DeletePolicy(request *DeletePolicyRequest) (response *DeletePolicyResponse, err error) {
response = CreateDeletePolicyResponse()
err = client.DoAction(request, response)
return
}
// DeletePolicyWithChan invokes the ram.DeletePolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/deletepolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeletePolicyWithChan(request *DeletePolicyRequest) (<-chan *DeletePolicyResponse, <-chan error) {
responseChan := make(chan *DeletePolicyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeletePolicy(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeletePolicyWithCallback invokes the ram.DeletePolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/deletepolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeletePolicyWithCallback(request *DeletePolicyRequest, callback func(response *DeletePolicyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeletePolicyResponse
var err error
defer close(result)
response, err = client.DeletePolicy(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeletePolicyRequest is the request struct for api DeletePolicy
type DeletePolicyRequest struct {
*requests.RpcRequest
PolicyName string `position:"Query" name:"PolicyName"`
}
// DeletePolicyResponse is the response struct for api DeletePolicy
type DeletePolicyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeletePolicyRequest creates a request to invoke DeletePolicy API
func CreateDeletePolicyRequest() (request *DeletePolicyRequest) {
request = &DeletePolicyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeletePolicy", "", "")
return
}
// CreateDeletePolicyResponse creates a response to parse from DeletePolicy response
func CreateDeletePolicyResponse() (response *DeletePolicyResponse) {
response = &DeletePolicyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeletePolicyVersion invokes the ram.DeletePolicyVersion API synchronously
// api document: https://help.aliyun.com/api/ram/deletepolicyversion.html
func (client *Client) DeletePolicyVersion(request *DeletePolicyVersionRequest) (response *DeletePolicyVersionResponse, err error) {
response = CreateDeletePolicyVersionResponse()
err = client.DoAction(request, response)
return
}
// DeletePolicyVersionWithChan invokes the ram.DeletePolicyVersion API asynchronously
// api document: https://help.aliyun.com/api/ram/deletepolicyversion.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeletePolicyVersionWithChan(request *DeletePolicyVersionRequest) (<-chan *DeletePolicyVersionResponse, <-chan error) {
responseChan := make(chan *DeletePolicyVersionResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeletePolicyVersion(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeletePolicyVersionWithCallback invokes the ram.DeletePolicyVersion API asynchronously
// api document: https://help.aliyun.com/api/ram/deletepolicyversion.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeletePolicyVersionWithCallback(request *DeletePolicyVersionRequest, callback func(response *DeletePolicyVersionResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeletePolicyVersionResponse
var err error
defer close(result)
response, err = client.DeletePolicyVersion(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeletePolicyVersionRequest is the request struct for api DeletePolicyVersion
type DeletePolicyVersionRequest struct {
*requests.RpcRequest
PolicyName string `position:"Query" name:"PolicyName"`
VersionId string `position:"Query" name:"VersionId"`
}
// DeletePolicyVersionResponse is the response struct for api DeletePolicyVersion
type DeletePolicyVersionResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeletePolicyVersionRequest creates a request to invoke DeletePolicyVersion API
func CreateDeletePolicyVersionRequest() (request *DeletePolicyVersionRequest) {
request = &DeletePolicyVersionRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeletePolicyVersion", "", "")
return
}
// CreateDeletePolicyVersionResponse creates a response to parse from DeletePolicyVersion response
func CreateDeletePolicyVersionResponse() (response *DeletePolicyVersionResponse) {
response = &DeletePolicyVersionResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeletePublicKey invokes the ram.DeletePublicKey API synchronously
// api document: https://help.aliyun.com/api/ram/deletepublickey.html
func (client *Client) DeletePublicKey(request *DeletePublicKeyRequest) (response *DeletePublicKeyResponse, err error) {
response = CreateDeletePublicKeyResponse()
err = client.DoAction(request, response)
return
}
// DeletePublicKeyWithChan invokes the ram.DeletePublicKey API asynchronously
// api document: https://help.aliyun.com/api/ram/deletepublickey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeletePublicKeyWithChan(request *DeletePublicKeyRequest) (<-chan *DeletePublicKeyResponse, <-chan error) {
responseChan := make(chan *DeletePublicKeyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeletePublicKey(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeletePublicKeyWithCallback invokes the ram.DeletePublicKey API asynchronously
// api document: https://help.aliyun.com/api/ram/deletepublickey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeletePublicKeyWithCallback(request *DeletePublicKeyRequest, callback func(response *DeletePublicKeyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeletePublicKeyResponse
var err error
defer close(result)
response, err = client.DeletePublicKey(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeletePublicKeyRequest is the request struct for api DeletePublicKey
type DeletePublicKeyRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
UserPublicKeyId string `position:"Query" name:"UserPublicKeyId"`
}
// DeletePublicKeyResponse is the response struct for api DeletePublicKey
type DeletePublicKeyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeletePublicKeyRequest creates a request to invoke DeletePublicKey API
func CreateDeletePublicKeyRequest() (request *DeletePublicKeyRequest) {
request = &DeletePublicKeyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeletePublicKey", "", "")
return
}
// CreateDeletePublicKeyResponse creates a response to parse from DeletePublicKey response
func CreateDeletePublicKeyResponse() (response *DeletePublicKeyResponse) {
response = &DeletePublicKeyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeleteRole invokes the ram.DeleteRole API synchronously
// api document: https://help.aliyun.com/api/ram/deleterole.html
func (client *Client) DeleteRole(request *DeleteRoleRequest) (response *DeleteRoleResponse, err error) {
response = CreateDeleteRoleResponse()
err = client.DoAction(request, response)
return
}
// DeleteRoleWithChan invokes the ram.DeleteRole API asynchronously
// api document: https://help.aliyun.com/api/ram/deleterole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteRoleWithChan(request *DeleteRoleRequest) (<-chan *DeleteRoleResponse, <-chan error) {
responseChan := make(chan *DeleteRoleResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeleteRole(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeleteRoleWithCallback invokes the ram.DeleteRole API asynchronously
// api document: https://help.aliyun.com/api/ram/deleterole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteRoleWithCallback(request *DeleteRoleRequest, callback func(response *DeleteRoleResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeleteRoleResponse
var err error
defer close(result)
response, err = client.DeleteRole(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeleteRoleRequest is the request struct for api DeleteRole
type DeleteRoleRequest struct {
*requests.RpcRequest
RoleName string `position:"Query" name:"RoleName"`
}
// DeleteRoleResponse is the response struct for api DeleteRole
type DeleteRoleResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeleteRoleRequest creates a request to invoke DeleteRole API
func CreateDeleteRoleRequest() (request *DeleteRoleRequest) {
request = &DeleteRoleRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeleteRole", "", "")
return
}
// CreateDeleteRoleResponse creates a response to parse from DeleteRole response
func CreateDeleteRoleResponse() (response *DeleteRoleResponse) {
response = &DeleteRoleResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeleteUser invokes the ram.DeleteUser API synchronously
// api document: https://help.aliyun.com/api/ram/deleteuser.html
func (client *Client) DeleteUser(request *DeleteUserRequest) (response *DeleteUserResponse, err error) {
response = CreateDeleteUserResponse()
err = client.DoAction(request, response)
return
}
// DeleteUserWithChan invokes the ram.DeleteUser API asynchronously
// api document: https://help.aliyun.com/api/ram/deleteuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteUserWithChan(request *DeleteUserRequest) (<-chan *DeleteUserResponse, <-chan error) {
responseChan := make(chan *DeleteUserResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeleteUser(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeleteUserWithCallback invokes the ram.DeleteUser API asynchronously
// api document: https://help.aliyun.com/api/ram/deleteuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteUserWithCallback(request *DeleteUserRequest, callback func(response *DeleteUserResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeleteUserResponse
var err error
defer close(result)
response, err = client.DeleteUser(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeleteUserRequest is the request struct for api DeleteUser
type DeleteUserRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// DeleteUserResponse is the response struct for api DeleteUser
type DeleteUserResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeleteUserRequest creates a request to invoke DeleteUser API
func CreateDeleteUserRequest() (request *DeleteUserRequest) {
request = &DeleteUserRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeleteUser", "", "")
return
}
// CreateDeleteUserResponse creates a response to parse from DeleteUser response
func CreateDeleteUserResponse() (response *DeleteUserResponse) {
response = &DeleteUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DeleteVirtualMFADevice invokes the ram.DeleteVirtualMFADevice API synchronously
// api document: https://help.aliyun.com/api/ram/deletevirtualmfadevice.html
func (client *Client) DeleteVirtualMFADevice(request *DeleteVirtualMFADeviceRequest) (response *DeleteVirtualMFADeviceResponse, err error) {
response = CreateDeleteVirtualMFADeviceResponse()
err = client.DoAction(request, response)
return
}
// DeleteVirtualMFADeviceWithChan invokes the ram.DeleteVirtualMFADevice API asynchronously
// api document: https://help.aliyun.com/api/ram/deletevirtualmfadevice.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteVirtualMFADeviceWithChan(request *DeleteVirtualMFADeviceRequest) (<-chan *DeleteVirtualMFADeviceResponse, <-chan error) {
responseChan := make(chan *DeleteVirtualMFADeviceResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DeleteVirtualMFADevice(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DeleteVirtualMFADeviceWithCallback invokes the ram.DeleteVirtualMFADevice API asynchronously
// api document: https://help.aliyun.com/api/ram/deletevirtualmfadevice.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DeleteVirtualMFADeviceWithCallback(request *DeleteVirtualMFADeviceRequest, callback func(response *DeleteVirtualMFADeviceResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DeleteVirtualMFADeviceResponse
var err error
defer close(result)
response, err = client.DeleteVirtualMFADevice(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DeleteVirtualMFADeviceRequest is the request struct for api DeleteVirtualMFADevice
type DeleteVirtualMFADeviceRequest struct {
*requests.RpcRequest
SerialNumber string `position:"Query" name:"SerialNumber"`
}
// DeleteVirtualMFADeviceResponse is the response struct for api DeleteVirtualMFADevice
type DeleteVirtualMFADeviceResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDeleteVirtualMFADeviceRequest creates a request to invoke DeleteVirtualMFADevice API
func CreateDeleteVirtualMFADeviceRequest() (request *DeleteVirtualMFADeviceRequest) {
request = &DeleteVirtualMFADeviceRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DeleteVirtualMFADevice", "", "")
return
}
// CreateDeleteVirtualMFADeviceResponse creates a response to parse from DeleteVirtualMFADevice response
func CreateDeleteVirtualMFADeviceResponse() (response *DeleteVirtualMFADeviceResponse) {
response = &DeleteVirtualMFADeviceResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DetachPolicyFromGroup invokes the ram.DetachPolicyFromGroup API synchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromgroup.html
func (client *Client) DetachPolicyFromGroup(request *DetachPolicyFromGroupRequest) (response *DetachPolicyFromGroupResponse, err error) {
response = CreateDetachPolicyFromGroupResponse()
err = client.DoAction(request, response)
return
}
// DetachPolicyFromGroupWithChan invokes the ram.DetachPolicyFromGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DetachPolicyFromGroupWithChan(request *DetachPolicyFromGroupRequest) (<-chan *DetachPolicyFromGroupResponse, <-chan error) {
responseChan := make(chan *DetachPolicyFromGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DetachPolicyFromGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DetachPolicyFromGroupWithCallback invokes the ram.DetachPolicyFromGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DetachPolicyFromGroupWithCallback(request *DetachPolicyFromGroupRequest, callback func(response *DetachPolicyFromGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DetachPolicyFromGroupResponse
var err error
defer close(result)
response, err = client.DetachPolicyFromGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DetachPolicyFromGroupRequest is the request struct for api DetachPolicyFromGroup
type DetachPolicyFromGroupRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
GroupName string `position:"Query" name:"GroupName"`
}
// DetachPolicyFromGroupResponse is the response struct for api DetachPolicyFromGroup
type DetachPolicyFromGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDetachPolicyFromGroupRequest creates a request to invoke DetachPolicyFromGroup API
func CreateDetachPolicyFromGroupRequest() (request *DetachPolicyFromGroupRequest) {
request = &DetachPolicyFromGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromGroup", "", "")
return
}
// CreateDetachPolicyFromGroupResponse creates a response to parse from DetachPolicyFromGroup response
func CreateDetachPolicyFromGroupResponse() (response *DetachPolicyFromGroupResponse) {
response = &DetachPolicyFromGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DetachPolicyFromRole invokes the ram.DetachPolicyFromRole API synchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromrole.html
func (client *Client) DetachPolicyFromRole(request *DetachPolicyFromRoleRequest) (response *DetachPolicyFromRoleResponse, err error) {
response = CreateDetachPolicyFromRoleResponse()
err = client.DoAction(request, response)
return
}
// DetachPolicyFromRoleWithChan invokes the ram.DetachPolicyFromRole API asynchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromrole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DetachPolicyFromRoleWithChan(request *DetachPolicyFromRoleRequest) (<-chan *DetachPolicyFromRoleResponse, <-chan error) {
responseChan := make(chan *DetachPolicyFromRoleResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DetachPolicyFromRole(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DetachPolicyFromRoleWithCallback invokes the ram.DetachPolicyFromRole API asynchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromrole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DetachPolicyFromRoleWithCallback(request *DetachPolicyFromRoleRequest, callback func(response *DetachPolicyFromRoleResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DetachPolicyFromRoleResponse
var err error
defer close(result)
response, err = client.DetachPolicyFromRole(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DetachPolicyFromRoleRequest is the request struct for api DetachPolicyFromRole
type DetachPolicyFromRoleRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
RoleName string `position:"Query" name:"RoleName"`
}
// DetachPolicyFromRoleResponse is the response struct for api DetachPolicyFromRole
type DetachPolicyFromRoleResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDetachPolicyFromRoleRequest creates a request to invoke DetachPolicyFromRole API
func CreateDetachPolicyFromRoleRequest() (request *DetachPolicyFromRoleRequest) {
request = &DetachPolicyFromRoleRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromRole", "", "")
return
}
// CreateDetachPolicyFromRoleResponse creates a response to parse from DetachPolicyFromRole response
func CreateDetachPolicyFromRoleResponse() (response *DetachPolicyFromRoleResponse) {
response = &DetachPolicyFromRoleResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// DetachPolicyFromUser invokes the ram.DetachPolicyFromUser API synchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromuser.html
func (client *Client) DetachPolicyFromUser(request *DetachPolicyFromUserRequest) (response *DetachPolicyFromUserResponse, err error) {
response = CreateDetachPolicyFromUserResponse()
err = client.DoAction(request, response)
return
}
// DetachPolicyFromUserWithChan invokes the ram.DetachPolicyFromUser API asynchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DetachPolicyFromUserWithChan(request *DetachPolicyFromUserRequest) (<-chan *DetachPolicyFromUserResponse, <-chan error) {
responseChan := make(chan *DetachPolicyFromUserResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.DetachPolicyFromUser(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// DetachPolicyFromUserWithCallback invokes the ram.DetachPolicyFromUser API asynchronously
// api document: https://help.aliyun.com/api/ram/detachpolicyfromuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) DetachPolicyFromUserWithCallback(request *DetachPolicyFromUserRequest, callback func(response *DetachPolicyFromUserResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *DetachPolicyFromUserResponse
var err error
defer close(result)
response, err = client.DetachPolicyFromUser(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// DetachPolicyFromUserRequest is the request struct for api DetachPolicyFromUser
type DetachPolicyFromUserRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
UserName string `position:"Query" name:"UserName"`
}
// DetachPolicyFromUserResponse is the response struct for api DetachPolicyFromUser
type DetachPolicyFromUserResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateDetachPolicyFromUserRequest creates a request to invoke DetachPolicyFromUser API
func CreateDetachPolicyFromUserRequest() (request *DetachPolicyFromUserRequest) {
request = &DetachPolicyFromUserRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "DetachPolicyFromUser", "", "")
return
}
// CreateDetachPolicyFromUserResponse creates a response to parse from DetachPolicyFromUser response
func CreateDetachPolicyFromUserResponse() (response *DetachPolicyFromUserResponse) {
response = &DetachPolicyFromUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetAccountAlias invokes the ram.GetAccountAlias API synchronously
// api document: https://help.aliyun.com/api/ram/getaccountalias.html
func (client *Client) GetAccountAlias(request *GetAccountAliasRequest) (response *GetAccountAliasResponse, err error) {
response = CreateGetAccountAliasResponse()
err = client.DoAction(request, response)
return
}
// GetAccountAliasWithChan invokes the ram.GetAccountAlias API asynchronously
// api document: https://help.aliyun.com/api/ram/getaccountalias.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetAccountAliasWithChan(request *GetAccountAliasRequest) (<-chan *GetAccountAliasResponse, <-chan error) {
responseChan := make(chan *GetAccountAliasResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetAccountAlias(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetAccountAliasWithCallback invokes the ram.GetAccountAlias API asynchronously
// api document: https://help.aliyun.com/api/ram/getaccountalias.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetAccountAliasWithCallback(request *GetAccountAliasRequest, callback func(response *GetAccountAliasResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetAccountAliasResponse
var err error
defer close(result)
response, err = client.GetAccountAlias(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetAccountAliasRequest is the request struct for api GetAccountAlias
type GetAccountAliasRequest struct {
*requests.RpcRequest
}
// GetAccountAliasResponse is the response struct for api GetAccountAlias
type GetAccountAliasResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
AccountAlias string `json:"AccountAlias" xml:"AccountAlias"`
}
// CreateGetAccountAliasRequest creates a request to invoke GetAccountAlias API
func CreateGetAccountAliasRequest() (request *GetAccountAliasRequest) {
request = &GetAccountAliasRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetAccountAlias", "", "")
return
}
// CreateGetAccountAliasResponse creates a response to parse from GetAccountAlias response
func CreateGetAccountAliasResponse() (response *GetAccountAliasResponse) {
response = &GetAccountAliasResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetGroup invokes the ram.GetGroup API synchronously
// api document: https://help.aliyun.com/api/ram/getgroup.html
func (client *Client) GetGroup(request *GetGroupRequest) (response *GetGroupResponse, err error) {
response = CreateGetGroupResponse()
err = client.DoAction(request, response)
return
}
// GetGroupWithChan invokes the ram.GetGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/getgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetGroupWithChan(request *GetGroupRequest) (<-chan *GetGroupResponse, <-chan error) {
responseChan := make(chan *GetGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetGroupWithCallback invokes the ram.GetGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/getgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetGroupWithCallback(request *GetGroupRequest, callback func(response *GetGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetGroupResponse
var err error
defer close(result)
response, err = client.GetGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetGroupRequest is the request struct for api GetGroup
type GetGroupRequest struct {
*requests.RpcRequest
GroupName string `position:"Query" name:"GroupName"`
}
// GetGroupResponse is the response struct for api GetGroup
type GetGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Group Group `json:"Group" xml:"Group"`
}
// CreateGetGroupRequest creates a request to invoke GetGroup API
func CreateGetGroupRequest() (request *GetGroupRequest) {
request = &GetGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetGroup", "", "")
return
}
// CreateGetGroupResponse creates a response to parse from GetGroup response
func CreateGetGroupResponse() (response *GetGroupResponse) {
response = &GetGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetLoginProfile invokes the ram.GetLoginProfile API synchronously
// api document: https://help.aliyun.com/api/ram/getloginprofile.html
func (client *Client) GetLoginProfile(request *GetLoginProfileRequest) (response *GetLoginProfileResponse, err error) {
response = CreateGetLoginProfileResponse()
err = client.DoAction(request, response)
return
}
// GetLoginProfileWithChan invokes the ram.GetLoginProfile API asynchronously
// api document: https://help.aliyun.com/api/ram/getloginprofile.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetLoginProfileWithChan(request *GetLoginProfileRequest) (<-chan *GetLoginProfileResponse, <-chan error) {
responseChan := make(chan *GetLoginProfileResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetLoginProfile(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetLoginProfileWithCallback invokes the ram.GetLoginProfile API asynchronously
// api document: https://help.aliyun.com/api/ram/getloginprofile.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetLoginProfileWithCallback(request *GetLoginProfileRequest, callback func(response *GetLoginProfileResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetLoginProfileResponse
var err error
defer close(result)
response, err = client.GetLoginProfile(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetLoginProfileRequest is the request struct for api GetLoginProfile
type GetLoginProfileRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// GetLoginProfileResponse is the response struct for api GetLoginProfile
type GetLoginProfileResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
LoginProfile LoginProfile `json:"LoginProfile" xml:"LoginProfile"`
}
// CreateGetLoginProfileRequest creates a request to invoke GetLoginProfile API
func CreateGetLoginProfileRequest() (request *GetLoginProfileRequest) {
request = &GetLoginProfileRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetLoginProfile", "", "")
return
}
// CreateGetLoginProfileResponse creates a response to parse from GetLoginProfile response
func CreateGetLoginProfileResponse() (response *GetLoginProfileResponse) {
response = &GetLoginProfileResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetPasswordPolicy invokes the ram.GetPasswordPolicy API synchronously
// api document: https://help.aliyun.com/api/ram/getpasswordpolicy.html
func (client *Client) GetPasswordPolicy(request *GetPasswordPolicyRequest) (response *GetPasswordPolicyResponse, err error) {
response = CreateGetPasswordPolicyResponse()
err = client.DoAction(request, response)
return
}
// GetPasswordPolicyWithChan invokes the ram.GetPasswordPolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/getpasswordpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetPasswordPolicyWithChan(request *GetPasswordPolicyRequest) (<-chan *GetPasswordPolicyResponse, <-chan error) {
responseChan := make(chan *GetPasswordPolicyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetPasswordPolicy(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetPasswordPolicyWithCallback invokes the ram.GetPasswordPolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/getpasswordpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetPasswordPolicyWithCallback(request *GetPasswordPolicyRequest, callback func(response *GetPasswordPolicyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetPasswordPolicyResponse
var err error
defer close(result)
response, err = client.GetPasswordPolicy(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetPasswordPolicyRequest is the request struct for api GetPasswordPolicy
type GetPasswordPolicyRequest struct {
*requests.RpcRequest
}
// GetPasswordPolicyResponse is the response struct for api GetPasswordPolicy
type GetPasswordPolicyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
PasswordPolicy PasswordPolicy `json:"PasswordPolicy" xml:"PasswordPolicy"`
}
// CreateGetPasswordPolicyRequest creates a request to invoke GetPasswordPolicy API
func CreateGetPasswordPolicyRequest() (request *GetPasswordPolicyRequest) {
request = &GetPasswordPolicyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetPasswordPolicy", "", "")
return
}
// CreateGetPasswordPolicyResponse creates a response to parse from GetPasswordPolicy response
func CreateGetPasswordPolicyResponse() (response *GetPasswordPolicyResponse) {
response = &GetPasswordPolicyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetPolicy invokes the ram.GetPolicy API synchronously
// api document: https://help.aliyun.com/api/ram/getpolicy.html
func (client *Client) GetPolicy(request *GetPolicyRequest) (response *GetPolicyResponse, err error) {
response = CreateGetPolicyResponse()
err = client.DoAction(request, response)
return
}
// GetPolicyWithChan invokes the ram.GetPolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/getpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetPolicyWithChan(request *GetPolicyRequest) (<-chan *GetPolicyResponse, <-chan error) {
responseChan := make(chan *GetPolicyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetPolicy(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetPolicyWithCallback invokes the ram.GetPolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/getpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetPolicyWithCallback(request *GetPolicyRequest, callback func(response *GetPolicyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetPolicyResponse
var err error
defer close(result)
response, err = client.GetPolicy(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetPolicyRequest is the request struct for api GetPolicy
type GetPolicyRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
}
// GetPolicyResponse is the response struct for api GetPolicy
type GetPolicyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Policy Policy `json:"Policy" xml:"Policy"`
}
// CreateGetPolicyRequest creates a request to invoke GetPolicy API
func CreateGetPolicyRequest() (request *GetPolicyRequest) {
request = &GetPolicyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetPolicy", "", "")
return
}
// CreateGetPolicyResponse creates a response to parse from GetPolicy response
func CreateGetPolicyResponse() (response *GetPolicyResponse) {
response = &GetPolicyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,106 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetPolicyVersion invokes the ram.GetPolicyVersion API synchronously
// api document: https://help.aliyun.com/api/ram/getpolicyversion.html
func (client *Client) GetPolicyVersion(request *GetPolicyVersionRequest) (response *GetPolicyVersionResponse, err error) {
response = CreateGetPolicyVersionResponse()
err = client.DoAction(request, response)
return
}
// GetPolicyVersionWithChan invokes the ram.GetPolicyVersion API asynchronously
// api document: https://help.aliyun.com/api/ram/getpolicyversion.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetPolicyVersionWithChan(request *GetPolicyVersionRequest) (<-chan *GetPolicyVersionResponse, <-chan error) {
responseChan := make(chan *GetPolicyVersionResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetPolicyVersion(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetPolicyVersionWithCallback invokes the ram.GetPolicyVersion API asynchronously
// api document: https://help.aliyun.com/api/ram/getpolicyversion.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetPolicyVersionWithCallback(request *GetPolicyVersionRequest, callback func(response *GetPolicyVersionResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetPolicyVersionResponse
var err error
defer close(result)
response, err = client.GetPolicyVersion(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetPolicyVersionRequest is the request struct for api GetPolicyVersion
type GetPolicyVersionRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
VersionId string `position:"Query" name:"VersionId"`
}
// GetPolicyVersionResponse is the response struct for api GetPolicyVersion
type GetPolicyVersionResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
PolicyVersion PolicyVersion `json:"PolicyVersion" xml:"PolicyVersion"`
}
// CreateGetPolicyVersionRequest creates a request to invoke GetPolicyVersion API
func CreateGetPolicyVersionRequest() (request *GetPolicyVersionRequest) {
request = &GetPolicyVersionRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetPolicyVersion", "", "")
return
}
// CreateGetPolicyVersionResponse creates a response to parse from GetPolicyVersion response
func CreateGetPolicyVersionResponse() (response *GetPolicyVersionResponse) {
response = &GetPolicyVersionResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetPublicKey invokes the ram.GetPublicKey API synchronously
// api document: https://help.aliyun.com/api/ram/getpublickey.html
func (client *Client) GetPublicKey(request *GetPublicKeyRequest) (response *GetPublicKeyResponse, err error) {
response = CreateGetPublicKeyResponse()
err = client.DoAction(request, response)
return
}
// GetPublicKeyWithChan invokes the ram.GetPublicKey API asynchronously
// api document: https://help.aliyun.com/api/ram/getpublickey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetPublicKeyWithChan(request *GetPublicKeyRequest) (<-chan *GetPublicKeyResponse, <-chan error) {
responseChan := make(chan *GetPublicKeyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetPublicKey(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetPublicKeyWithCallback invokes the ram.GetPublicKey API asynchronously
// api document: https://help.aliyun.com/api/ram/getpublickey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetPublicKeyWithCallback(request *GetPublicKeyRequest, callback func(response *GetPublicKeyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetPublicKeyResponse
var err error
defer close(result)
response, err = client.GetPublicKey(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetPublicKeyRequest is the request struct for api GetPublicKey
type GetPublicKeyRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
UserPublicKeyId string `position:"Query" name:"UserPublicKeyId"`
}
// GetPublicKeyResponse is the response struct for api GetPublicKey
type GetPublicKeyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
PublicKey PublicKey `json:"PublicKey" xml:"PublicKey"`
}
// CreateGetPublicKeyRequest creates a request to invoke GetPublicKey API
func CreateGetPublicKeyRequest() (request *GetPublicKeyRequest) {
request = &GetPublicKeyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetPublicKey", "", "")
return
}
// CreateGetPublicKeyResponse creates a response to parse from GetPublicKey response
func CreateGetPublicKeyResponse() (response *GetPublicKeyResponse) {
response = &GetPublicKeyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetRole invokes the ram.GetRole API synchronously
// api document: https://help.aliyun.com/api/ram/getrole.html
func (client *Client) GetRole(request *GetRoleRequest) (response *GetRoleResponse, err error) {
response = CreateGetRoleResponse()
err = client.DoAction(request, response)
return
}
// GetRoleWithChan invokes the ram.GetRole API asynchronously
// api document: https://help.aliyun.com/api/ram/getrole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetRoleWithChan(request *GetRoleRequest) (<-chan *GetRoleResponse, <-chan error) {
responseChan := make(chan *GetRoleResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetRole(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetRoleWithCallback invokes the ram.GetRole API asynchronously
// api document: https://help.aliyun.com/api/ram/getrole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetRoleWithCallback(request *GetRoleRequest, callback func(response *GetRoleResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetRoleResponse
var err error
defer close(result)
response, err = client.GetRole(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetRoleRequest is the request struct for api GetRole
type GetRoleRequest struct {
*requests.RpcRequest
RoleName string `position:"Query" name:"RoleName"`
}
// GetRoleResponse is the response struct for api GetRole
type GetRoleResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Role Role `json:"Role" xml:"Role"`
}
// CreateGetRoleRequest creates a request to invoke GetRole API
func CreateGetRoleRequest() (request *GetRoleRequest) {
request = &GetRoleRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetRole", "", "")
return
}
// CreateGetRoleResponse creates a response to parse from GetRole response
func CreateGetRoleResponse() (response *GetRoleResponse) {
response = &GetRoleResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetSecurityPreference invokes the ram.GetSecurityPreference API synchronously
// api document: https://help.aliyun.com/api/ram/getsecuritypreference.html
func (client *Client) GetSecurityPreference(request *GetSecurityPreferenceRequest) (response *GetSecurityPreferenceResponse, err error) {
response = CreateGetSecurityPreferenceResponse()
err = client.DoAction(request, response)
return
}
// GetSecurityPreferenceWithChan invokes the ram.GetSecurityPreference API asynchronously
// api document: https://help.aliyun.com/api/ram/getsecuritypreference.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetSecurityPreferenceWithChan(request *GetSecurityPreferenceRequest) (<-chan *GetSecurityPreferenceResponse, <-chan error) {
responseChan := make(chan *GetSecurityPreferenceResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetSecurityPreference(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetSecurityPreferenceWithCallback invokes the ram.GetSecurityPreference API asynchronously
// api document: https://help.aliyun.com/api/ram/getsecuritypreference.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetSecurityPreferenceWithCallback(request *GetSecurityPreferenceRequest, callback func(response *GetSecurityPreferenceResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetSecurityPreferenceResponse
var err error
defer close(result)
response, err = client.GetSecurityPreference(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetSecurityPreferenceRequest is the request struct for api GetSecurityPreference
type GetSecurityPreferenceRequest struct {
*requests.RpcRequest
}
// GetSecurityPreferenceResponse is the response struct for api GetSecurityPreference
type GetSecurityPreferenceResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
SecurityPreference SecurityPreference `json:"SecurityPreference" xml:"SecurityPreference"`
}
// CreateGetSecurityPreferenceRequest creates a request to invoke GetSecurityPreference API
func CreateGetSecurityPreferenceRequest() (request *GetSecurityPreferenceRequest) {
request = &GetSecurityPreferenceRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetSecurityPreference", "", "")
return
}
// CreateGetSecurityPreferenceResponse creates a response to parse from GetSecurityPreference response
func CreateGetSecurityPreferenceResponse() (response *GetSecurityPreferenceResponse) {
response = &GetSecurityPreferenceResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetUser invokes the ram.GetUser API synchronously
// api document: https://help.aliyun.com/api/ram/getuser.html
func (client *Client) GetUser(request *GetUserRequest) (response *GetUserResponse, err error) {
response = CreateGetUserResponse()
err = client.DoAction(request, response)
return
}
// GetUserWithChan invokes the ram.GetUser API asynchronously
// api document: https://help.aliyun.com/api/ram/getuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetUserWithChan(request *GetUserRequest) (<-chan *GetUserResponse, <-chan error) {
responseChan := make(chan *GetUserResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetUser(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetUserWithCallback invokes the ram.GetUser API asynchronously
// api document: https://help.aliyun.com/api/ram/getuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetUserWithCallback(request *GetUserRequest, callback func(response *GetUserResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetUserResponse
var err error
defer close(result)
response, err = client.GetUser(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetUserRequest is the request struct for api GetUser
type GetUserRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// GetUserResponse is the response struct for api GetUser
type GetUserResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
User User `json:"User" xml:"User"`
}
// CreateGetUserRequest creates a request to invoke GetUser API
func CreateGetUserRequest() (request *GetUserRequest) {
request = &GetUserRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetUser", "", "")
return
}
// CreateGetUserResponse creates a response to parse from GetUser response
func CreateGetUserResponse() (response *GetUserResponse) {
response = &GetUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// GetUserMFAInfo invokes the ram.GetUserMFAInfo API synchronously
// api document: https://help.aliyun.com/api/ram/getusermfainfo.html
func (client *Client) GetUserMFAInfo(request *GetUserMFAInfoRequest) (response *GetUserMFAInfoResponse, err error) {
response = CreateGetUserMFAInfoResponse()
err = client.DoAction(request, response)
return
}
// GetUserMFAInfoWithChan invokes the ram.GetUserMFAInfo API asynchronously
// api document: https://help.aliyun.com/api/ram/getusermfainfo.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetUserMFAInfoWithChan(request *GetUserMFAInfoRequest) (<-chan *GetUserMFAInfoResponse, <-chan error) {
responseChan := make(chan *GetUserMFAInfoResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.GetUserMFAInfo(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// GetUserMFAInfoWithCallback invokes the ram.GetUserMFAInfo API asynchronously
// api document: https://help.aliyun.com/api/ram/getusermfainfo.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) GetUserMFAInfoWithCallback(request *GetUserMFAInfoRequest, callback func(response *GetUserMFAInfoResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *GetUserMFAInfoResponse
var err error
defer close(result)
response, err = client.GetUserMFAInfo(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// GetUserMFAInfoRequest is the request struct for api GetUserMFAInfo
type GetUserMFAInfoRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// GetUserMFAInfoResponse is the response struct for api GetUserMFAInfo
type GetUserMFAInfoResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
MFADevice MFADevice `json:"MFADevice" xml:"MFADevice"`
}
// CreateGetUserMFAInfoRequest creates a request to invoke GetUserMFAInfo API
func CreateGetUserMFAInfoRequest() (request *GetUserMFAInfoRequest) {
request = &GetUserMFAInfoRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "GetUserMFAInfo", "", "")
return
}
// CreateGetUserMFAInfoResponse creates a response to parse from GetUserMFAInfo response
func CreateGetUserMFAInfoResponse() (response *GetUserMFAInfoResponse) {
response = &GetUserMFAInfoResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListAccessKeys invokes the ram.ListAccessKeys API synchronously
// api document: https://help.aliyun.com/api/ram/listaccesskeys.html
func (client *Client) ListAccessKeys(request *ListAccessKeysRequest) (response *ListAccessKeysResponse, err error) {
response = CreateListAccessKeysResponse()
err = client.DoAction(request, response)
return
}
// ListAccessKeysWithChan invokes the ram.ListAccessKeys API asynchronously
// api document: https://help.aliyun.com/api/ram/listaccesskeys.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListAccessKeysWithChan(request *ListAccessKeysRequest) (<-chan *ListAccessKeysResponse, <-chan error) {
responseChan := make(chan *ListAccessKeysResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListAccessKeys(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListAccessKeysWithCallback invokes the ram.ListAccessKeys API asynchronously
// api document: https://help.aliyun.com/api/ram/listaccesskeys.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListAccessKeysWithCallback(request *ListAccessKeysRequest, callback func(response *ListAccessKeysResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListAccessKeysResponse
var err error
defer close(result)
response, err = client.ListAccessKeys(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListAccessKeysRequest is the request struct for api ListAccessKeys
type ListAccessKeysRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// ListAccessKeysResponse is the response struct for api ListAccessKeys
type ListAccessKeysResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
AccessKeys AccessKeys `json:"AccessKeys" xml:"AccessKeys"`
}
// CreateListAccessKeysRequest creates a request to invoke ListAccessKeys API
func CreateListAccessKeysRequest() (request *ListAccessKeysRequest) {
request = &ListAccessKeysRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListAccessKeys", "", "")
return
}
// CreateListAccessKeysResponse creates a response to parse from ListAccessKeys response
func CreateListAccessKeysResponse() (response *ListAccessKeysResponse) {
response = &ListAccessKeysResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,107 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListEntitiesForPolicy invokes the ram.ListEntitiesForPolicy API synchronously
// api document: https://help.aliyun.com/api/ram/listentitiesforpolicy.html
func (client *Client) ListEntitiesForPolicy(request *ListEntitiesForPolicyRequest) (response *ListEntitiesForPolicyResponse, err error) {
response = CreateListEntitiesForPolicyResponse()
err = client.DoAction(request, response)
return
}
// ListEntitiesForPolicyWithChan invokes the ram.ListEntitiesForPolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/listentitiesforpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListEntitiesForPolicyWithChan(request *ListEntitiesForPolicyRequest) (<-chan *ListEntitiesForPolicyResponse, <-chan error) {
responseChan := make(chan *ListEntitiesForPolicyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListEntitiesForPolicy(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListEntitiesForPolicyWithCallback invokes the ram.ListEntitiesForPolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/listentitiesforpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListEntitiesForPolicyWithCallback(request *ListEntitiesForPolicyRequest, callback func(response *ListEntitiesForPolicyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListEntitiesForPolicyResponse
var err error
defer close(result)
response, err = client.ListEntitiesForPolicy(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListEntitiesForPolicyRequest is the request struct for api ListEntitiesForPolicy
type ListEntitiesForPolicyRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
}
// ListEntitiesForPolicyResponse is the response struct for api ListEntitiesForPolicy
type ListEntitiesForPolicyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Groups GroupsInListEntitiesForPolicy `json:"Groups" xml:"Groups"`
Users UsersInListEntitiesForPolicy `json:"Users" xml:"Users"`
Roles RolesInListEntitiesForPolicy `json:"Roles" xml:"Roles"`
}
// CreateListEntitiesForPolicyRequest creates a request to invoke ListEntitiesForPolicy API
func CreateListEntitiesForPolicyRequest() (request *ListEntitiesForPolicyRequest) {
request = &ListEntitiesForPolicyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListEntitiesForPolicy", "", "")
return
}
// CreateListEntitiesForPolicyResponse creates a response to parse from ListEntitiesForPolicy response
func CreateListEntitiesForPolicyResponse() (response *ListEntitiesForPolicyResponse) {
response = &ListEntitiesForPolicyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,107 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListGroups invokes the ram.ListGroups API synchronously
// api document: https://help.aliyun.com/api/ram/listgroups.html
func (client *Client) ListGroups(request *ListGroupsRequest) (response *ListGroupsResponse, err error) {
response = CreateListGroupsResponse()
err = client.DoAction(request, response)
return
}
// ListGroupsWithChan invokes the ram.ListGroups API asynchronously
// api document: https://help.aliyun.com/api/ram/listgroups.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListGroupsWithChan(request *ListGroupsRequest) (<-chan *ListGroupsResponse, <-chan error) {
responseChan := make(chan *ListGroupsResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListGroups(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListGroupsWithCallback invokes the ram.ListGroups API asynchronously
// api document: https://help.aliyun.com/api/ram/listgroups.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListGroupsWithCallback(request *ListGroupsRequest, callback func(response *ListGroupsResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListGroupsResponse
var err error
defer close(result)
response, err = client.ListGroups(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListGroupsRequest is the request struct for api ListGroups
type ListGroupsRequest struct {
*requests.RpcRequest
Marker string `position:"Query" name:"Marker"`
MaxItems requests.Integer `position:"Query" name:"MaxItems"`
}
// ListGroupsResponse is the response struct for api ListGroups
type ListGroupsResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
IsTruncated bool `json:"IsTruncated" xml:"IsTruncated"`
Marker string `json:"Marker" xml:"Marker"`
Groups GroupsInListGroups `json:"Groups" xml:"Groups"`
}
// CreateListGroupsRequest creates a request to invoke ListGroups API
func CreateListGroupsRequest() (request *ListGroupsRequest) {
request = &ListGroupsRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListGroups", "", "")
return
}
// CreateListGroupsResponse creates a response to parse from ListGroups response
func CreateListGroupsResponse() (response *ListGroupsResponse) {
response = &ListGroupsResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListGroupsForUser invokes the ram.ListGroupsForUser API synchronously
// api document: https://help.aliyun.com/api/ram/listgroupsforuser.html
func (client *Client) ListGroupsForUser(request *ListGroupsForUserRequest) (response *ListGroupsForUserResponse, err error) {
response = CreateListGroupsForUserResponse()
err = client.DoAction(request, response)
return
}
// ListGroupsForUserWithChan invokes the ram.ListGroupsForUser API asynchronously
// api document: https://help.aliyun.com/api/ram/listgroupsforuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListGroupsForUserWithChan(request *ListGroupsForUserRequest) (<-chan *ListGroupsForUserResponse, <-chan error) {
responseChan := make(chan *ListGroupsForUserResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListGroupsForUser(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListGroupsForUserWithCallback invokes the ram.ListGroupsForUser API asynchronously
// api document: https://help.aliyun.com/api/ram/listgroupsforuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListGroupsForUserWithCallback(request *ListGroupsForUserRequest, callback func(response *ListGroupsForUserResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListGroupsForUserResponse
var err error
defer close(result)
response, err = client.ListGroupsForUser(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListGroupsForUserRequest is the request struct for api ListGroupsForUser
type ListGroupsForUserRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// ListGroupsForUserResponse is the response struct for api ListGroupsForUser
type ListGroupsForUserResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Groups GroupsInListGroupsForUser `json:"Groups" xml:"Groups"`
}
// CreateListGroupsForUserRequest creates a request to invoke ListGroupsForUser API
func CreateListGroupsForUserRequest() (request *ListGroupsForUserRequest) {
request = &ListGroupsForUserRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListGroupsForUser", "", "")
return
}
// CreateListGroupsForUserResponse creates a response to parse from ListGroupsForUser response
func CreateListGroupsForUserResponse() (response *ListGroupsForUserResponse) {
response = &ListGroupsForUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,108 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListPolicies invokes the ram.ListPolicies API synchronously
// api document: https://help.aliyun.com/api/ram/listpolicies.html
func (client *Client) ListPolicies(request *ListPoliciesRequest) (response *ListPoliciesResponse, err error) {
response = CreateListPoliciesResponse()
err = client.DoAction(request, response)
return
}
// ListPoliciesWithChan invokes the ram.ListPolicies API asynchronously
// api document: https://help.aliyun.com/api/ram/listpolicies.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPoliciesWithChan(request *ListPoliciesRequest) (<-chan *ListPoliciesResponse, <-chan error) {
responseChan := make(chan *ListPoliciesResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListPolicies(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListPoliciesWithCallback invokes the ram.ListPolicies API asynchronously
// api document: https://help.aliyun.com/api/ram/listpolicies.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPoliciesWithCallback(request *ListPoliciesRequest, callback func(response *ListPoliciesResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListPoliciesResponse
var err error
defer close(result)
response, err = client.ListPolicies(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListPoliciesRequest is the request struct for api ListPolicies
type ListPoliciesRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
Marker string `position:"Query" name:"Marker"`
MaxItems requests.Integer `position:"Query" name:"MaxItems"`
}
// ListPoliciesResponse is the response struct for api ListPolicies
type ListPoliciesResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
IsTruncated bool `json:"IsTruncated" xml:"IsTruncated"`
Marker string `json:"Marker" xml:"Marker"`
Policies PoliciesInListPolicies `json:"Policies" xml:"Policies"`
}
// CreateListPoliciesRequest creates a request to invoke ListPolicies API
func CreateListPoliciesRequest() (request *ListPoliciesRequest) {
request = &ListPoliciesRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListPolicies", "", "")
return
}
// CreateListPoliciesResponse creates a response to parse from ListPolicies response
func CreateListPoliciesResponse() (response *ListPoliciesResponse) {
response = &ListPoliciesResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListPoliciesForGroup invokes the ram.ListPoliciesForGroup API synchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforgroup.html
func (client *Client) ListPoliciesForGroup(request *ListPoliciesForGroupRequest) (response *ListPoliciesForGroupResponse, err error) {
response = CreateListPoliciesForGroupResponse()
err = client.DoAction(request, response)
return
}
// ListPoliciesForGroupWithChan invokes the ram.ListPoliciesForGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPoliciesForGroupWithChan(request *ListPoliciesForGroupRequest) (<-chan *ListPoliciesForGroupResponse, <-chan error) {
responseChan := make(chan *ListPoliciesForGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListPoliciesForGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListPoliciesForGroupWithCallback invokes the ram.ListPoliciesForGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPoliciesForGroupWithCallback(request *ListPoliciesForGroupRequest, callback func(response *ListPoliciesForGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListPoliciesForGroupResponse
var err error
defer close(result)
response, err = client.ListPoliciesForGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListPoliciesForGroupRequest is the request struct for api ListPoliciesForGroup
type ListPoliciesForGroupRequest struct {
*requests.RpcRequest
GroupName string `position:"Query" name:"GroupName"`
}
// ListPoliciesForGroupResponse is the response struct for api ListPoliciesForGroup
type ListPoliciesForGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Policies PoliciesInListPoliciesForGroup `json:"Policies" xml:"Policies"`
}
// CreateListPoliciesForGroupRequest creates a request to invoke ListPoliciesForGroup API
func CreateListPoliciesForGroupRequest() (request *ListPoliciesForGroupRequest) {
request = &ListPoliciesForGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForGroup", "", "")
return
}
// CreateListPoliciesForGroupResponse creates a response to parse from ListPoliciesForGroup response
func CreateListPoliciesForGroupResponse() (response *ListPoliciesForGroupResponse) {
response = &ListPoliciesForGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListPoliciesForRole invokes the ram.ListPoliciesForRole API synchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforrole.html
func (client *Client) ListPoliciesForRole(request *ListPoliciesForRoleRequest) (response *ListPoliciesForRoleResponse, err error) {
response = CreateListPoliciesForRoleResponse()
err = client.DoAction(request, response)
return
}
// ListPoliciesForRoleWithChan invokes the ram.ListPoliciesForRole API asynchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforrole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPoliciesForRoleWithChan(request *ListPoliciesForRoleRequest) (<-chan *ListPoliciesForRoleResponse, <-chan error) {
responseChan := make(chan *ListPoliciesForRoleResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListPoliciesForRole(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListPoliciesForRoleWithCallback invokes the ram.ListPoliciesForRole API asynchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforrole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPoliciesForRoleWithCallback(request *ListPoliciesForRoleRequest, callback func(response *ListPoliciesForRoleResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListPoliciesForRoleResponse
var err error
defer close(result)
response, err = client.ListPoliciesForRole(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListPoliciesForRoleRequest is the request struct for api ListPoliciesForRole
type ListPoliciesForRoleRequest struct {
*requests.RpcRequest
RoleName string `position:"Query" name:"RoleName"`
}
// ListPoliciesForRoleResponse is the response struct for api ListPoliciesForRole
type ListPoliciesForRoleResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Policies PoliciesInListPoliciesForRole `json:"Policies" xml:"Policies"`
}
// CreateListPoliciesForRoleRequest creates a request to invoke ListPoliciesForRole API
func CreateListPoliciesForRoleRequest() (request *ListPoliciesForRoleRequest) {
request = &ListPoliciesForRoleRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForRole", "", "")
return
}
// CreateListPoliciesForRoleResponse creates a response to parse from ListPoliciesForRole response
func CreateListPoliciesForRoleResponse() (response *ListPoliciesForRoleResponse) {
response = &ListPoliciesForRoleResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListPoliciesForUser invokes the ram.ListPoliciesForUser API synchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforuser.html
func (client *Client) ListPoliciesForUser(request *ListPoliciesForUserRequest) (response *ListPoliciesForUserResponse, err error) {
response = CreateListPoliciesForUserResponse()
err = client.DoAction(request, response)
return
}
// ListPoliciesForUserWithChan invokes the ram.ListPoliciesForUser API asynchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPoliciesForUserWithChan(request *ListPoliciesForUserRequest) (<-chan *ListPoliciesForUserResponse, <-chan error) {
responseChan := make(chan *ListPoliciesForUserResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListPoliciesForUser(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListPoliciesForUserWithCallback invokes the ram.ListPoliciesForUser API asynchronously
// api document: https://help.aliyun.com/api/ram/listpoliciesforuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPoliciesForUserWithCallback(request *ListPoliciesForUserRequest, callback func(response *ListPoliciesForUserResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListPoliciesForUserResponse
var err error
defer close(result)
response, err = client.ListPoliciesForUser(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListPoliciesForUserRequest is the request struct for api ListPoliciesForUser
type ListPoliciesForUserRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// ListPoliciesForUserResponse is the response struct for api ListPoliciesForUser
type ListPoliciesForUserResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Policies PoliciesInListPoliciesForUser `json:"Policies" xml:"Policies"`
}
// CreateListPoliciesForUserRequest creates a request to invoke ListPoliciesForUser API
func CreateListPoliciesForUserRequest() (request *ListPoliciesForUserRequest) {
request = &ListPoliciesForUserRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListPoliciesForUser", "", "")
return
}
// CreateListPoliciesForUserResponse creates a response to parse from ListPoliciesForUser response
func CreateListPoliciesForUserResponse() (response *ListPoliciesForUserResponse) {
response = &ListPoliciesForUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListPolicyVersions invokes the ram.ListPolicyVersions API synchronously
// api document: https://help.aliyun.com/api/ram/listpolicyversions.html
func (client *Client) ListPolicyVersions(request *ListPolicyVersionsRequest) (response *ListPolicyVersionsResponse, err error) {
response = CreateListPolicyVersionsResponse()
err = client.DoAction(request, response)
return
}
// ListPolicyVersionsWithChan invokes the ram.ListPolicyVersions API asynchronously
// api document: https://help.aliyun.com/api/ram/listpolicyversions.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPolicyVersionsWithChan(request *ListPolicyVersionsRequest) (<-chan *ListPolicyVersionsResponse, <-chan error) {
responseChan := make(chan *ListPolicyVersionsResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListPolicyVersions(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListPolicyVersionsWithCallback invokes the ram.ListPolicyVersions API asynchronously
// api document: https://help.aliyun.com/api/ram/listpolicyversions.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPolicyVersionsWithCallback(request *ListPolicyVersionsRequest, callback func(response *ListPolicyVersionsResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListPolicyVersionsResponse
var err error
defer close(result)
response, err = client.ListPolicyVersions(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListPolicyVersionsRequest is the request struct for api ListPolicyVersions
type ListPolicyVersionsRequest struct {
*requests.RpcRequest
PolicyType string `position:"Query" name:"PolicyType"`
PolicyName string `position:"Query" name:"PolicyName"`
}
// ListPolicyVersionsResponse is the response struct for api ListPolicyVersions
type ListPolicyVersionsResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
PolicyVersions PolicyVersions `json:"PolicyVersions" xml:"PolicyVersions"`
}
// CreateListPolicyVersionsRequest creates a request to invoke ListPolicyVersions API
func CreateListPolicyVersionsRequest() (request *ListPolicyVersionsRequest) {
request = &ListPolicyVersionsRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListPolicyVersions", "", "")
return
}
// CreateListPolicyVersionsResponse creates a response to parse from ListPolicyVersions response
func CreateListPolicyVersionsResponse() (response *ListPolicyVersionsResponse) {
response = &ListPolicyVersionsResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListPublicKeys invokes the ram.ListPublicKeys API synchronously
// api document: https://help.aliyun.com/api/ram/listpublickeys.html
func (client *Client) ListPublicKeys(request *ListPublicKeysRequest) (response *ListPublicKeysResponse, err error) {
response = CreateListPublicKeysResponse()
err = client.DoAction(request, response)
return
}
// ListPublicKeysWithChan invokes the ram.ListPublicKeys API asynchronously
// api document: https://help.aliyun.com/api/ram/listpublickeys.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPublicKeysWithChan(request *ListPublicKeysRequest) (<-chan *ListPublicKeysResponse, <-chan error) {
responseChan := make(chan *ListPublicKeysResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListPublicKeys(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListPublicKeysWithCallback invokes the ram.ListPublicKeys API asynchronously
// api document: https://help.aliyun.com/api/ram/listpublickeys.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListPublicKeysWithCallback(request *ListPublicKeysRequest, callback func(response *ListPublicKeysResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListPublicKeysResponse
var err error
defer close(result)
response, err = client.ListPublicKeys(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListPublicKeysRequest is the request struct for api ListPublicKeys
type ListPublicKeysRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// ListPublicKeysResponse is the response struct for api ListPublicKeys
type ListPublicKeysResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
PublicKeys PublicKeys `json:"PublicKeys" xml:"PublicKeys"`
}
// CreateListPublicKeysRequest creates a request to invoke ListPublicKeys API
func CreateListPublicKeysRequest() (request *ListPublicKeysRequest) {
request = &ListPublicKeysRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListPublicKeys", "", "")
return
}
// CreateListPublicKeysResponse creates a response to parse from ListPublicKeys response
func CreateListPublicKeysResponse() (response *ListPublicKeysResponse) {
response = &ListPublicKeysResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,107 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListRoles invokes the ram.ListRoles API synchronously
// api document: https://help.aliyun.com/api/ram/listroles.html
func (client *Client) ListRoles(request *ListRolesRequest) (response *ListRolesResponse, err error) {
response = CreateListRolesResponse()
err = client.DoAction(request, response)
return
}
// ListRolesWithChan invokes the ram.ListRoles API asynchronously
// api document: https://help.aliyun.com/api/ram/listroles.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListRolesWithChan(request *ListRolesRequest) (<-chan *ListRolesResponse, <-chan error) {
responseChan := make(chan *ListRolesResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListRoles(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListRolesWithCallback invokes the ram.ListRoles API asynchronously
// api document: https://help.aliyun.com/api/ram/listroles.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListRolesWithCallback(request *ListRolesRequest, callback func(response *ListRolesResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListRolesResponse
var err error
defer close(result)
response, err = client.ListRoles(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListRolesRequest is the request struct for api ListRoles
type ListRolesRequest struct {
*requests.RpcRequest
Marker string `position:"Query" name:"Marker"`
MaxItems requests.Integer `position:"Query" name:"MaxItems"`
}
// ListRolesResponse is the response struct for api ListRoles
type ListRolesResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
IsTruncated bool `json:"IsTruncated" xml:"IsTruncated"`
Marker string `json:"Marker" xml:"Marker"`
Roles RolesInListRoles `json:"Roles" xml:"Roles"`
}
// CreateListRolesRequest creates a request to invoke ListRoles API
func CreateListRolesRequest() (request *ListRolesRequest) {
request = &ListRolesRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListRoles", "", "")
return
}
// CreateListRolesResponse creates a response to parse from ListRoles response
func CreateListRolesResponse() (response *ListRolesResponse) {
response = &ListRolesResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,107 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListUsers invokes the ram.ListUsers API synchronously
// api document: https://help.aliyun.com/api/ram/listusers.html
func (client *Client) ListUsers(request *ListUsersRequest) (response *ListUsersResponse, err error) {
response = CreateListUsersResponse()
err = client.DoAction(request, response)
return
}
// ListUsersWithChan invokes the ram.ListUsers API asynchronously
// api document: https://help.aliyun.com/api/ram/listusers.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListUsersWithChan(request *ListUsersRequest) (<-chan *ListUsersResponse, <-chan error) {
responseChan := make(chan *ListUsersResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListUsers(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListUsersWithCallback invokes the ram.ListUsers API asynchronously
// api document: https://help.aliyun.com/api/ram/listusers.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListUsersWithCallback(request *ListUsersRequest, callback func(response *ListUsersResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListUsersResponse
var err error
defer close(result)
response, err = client.ListUsers(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListUsersRequest is the request struct for api ListUsers
type ListUsersRequest struct {
*requests.RpcRequest
Marker string `position:"Query" name:"Marker"`
MaxItems requests.Integer `position:"Query" name:"MaxItems"`
}
// ListUsersResponse is the response struct for api ListUsers
type ListUsersResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
IsTruncated bool `json:"IsTruncated" xml:"IsTruncated"`
Marker string `json:"Marker" xml:"Marker"`
Users UsersInListUsers `json:"Users" xml:"Users"`
}
// CreateListUsersRequest creates a request to invoke ListUsers API
func CreateListUsersRequest() (request *ListUsersRequest) {
request = &ListUsersRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListUsers", "", "")
return
}
// CreateListUsersResponse creates a response to parse from ListUsers response
func CreateListUsersResponse() (response *ListUsersResponse) {
response = &ListUsersResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListUsersForGroup invokes the ram.ListUsersForGroup API synchronously
// api document: https://help.aliyun.com/api/ram/listusersforgroup.html
func (client *Client) ListUsersForGroup(request *ListUsersForGroupRequest) (response *ListUsersForGroupResponse, err error) {
response = CreateListUsersForGroupResponse()
err = client.DoAction(request, response)
return
}
// ListUsersForGroupWithChan invokes the ram.ListUsersForGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/listusersforgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListUsersForGroupWithChan(request *ListUsersForGroupRequest) (<-chan *ListUsersForGroupResponse, <-chan error) {
responseChan := make(chan *ListUsersForGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListUsersForGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListUsersForGroupWithCallback invokes the ram.ListUsersForGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/listusersforgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListUsersForGroupWithCallback(request *ListUsersForGroupRequest, callback func(response *ListUsersForGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListUsersForGroupResponse
var err error
defer close(result)
response, err = client.ListUsersForGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListUsersForGroupRequest is the request struct for api ListUsersForGroup
type ListUsersForGroupRequest struct {
*requests.RpcRequest
GroupName string `position:"Query" name:"GroupName"`
}
// ListUsersForGroupResponse is the response struct for api ListUsersForGroup
type ListUsersForGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Users UsersInListUsersForGroup `json:"Users" xml:"Users"`
}
// CreateListUsersForGroupRequest creates a request to invoke ListUsersForGroup API
func CreateListUsersForGroupRequest() (request *ListUsersForGroupRequest) {
request = &ListUsersForGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListUsersForGroup", "", "")
return
}
// CreateListUsersForGroupResponse creates a response to parse from ListUsersForGroup response
func CreateListUsersForGroupResponse() (response *ListUsersForGroupResponse) {
response = &ListUsersForGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// ListVirtualMFADevices invokes the ram.ListVirtualMFADevices API synchronously
// api document: https://help.aliyun.com/api/ram/listvirtualmfadevices.html
func (client *Client) ListVirtualMFADevices(request *ListVirtualMFADevicesRequest) (response *ListVirtualMFADevicesResponse, err error) {
response = CreateListVirtualMFADevicesResponse()
err = client.DoAction(request, response)
return
}
// ListVirtualMFADevicesWithChan invokes the ram.ListVirtualMFADevices API asynchronously
// api document: https://help.aliyun.com/api/ram/listvirtualmfadevices.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListVirtualMFADevicesWithChan(request *ListVirtualMFADevicesRequest) (<-chan *ListVirtualMFADevicesResponse, <-chan error) {
responseChan := make(chan *ListVirtualMFADevicesResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.ListVirtualMFADevices(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// ListVirtualMFADevicesWithCallback invokes the ram.ListVirtualMFADevices API asynchronously
// api document: https://help.aliyun.com/api/ram/listvirtualmfadevices.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) ListVirtualMFADevicesWithCallback(request *ListVirtualMFADevicesRequest, callback func(response *ListVirtualMFADevicesResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *ListVirtualMFADevicesResponse
var err error
defer close(result)
response, err = client.ListVirtualMFADevices(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// ListVirtualMFADevicesRequest is the request struct for api ListVirtualMFADevices
type ListVirtualMFADevicesRequest struct {
*requests.RpcRequest
}
// ListVirtualMFADevicesResponse is the response struct for api ListVirtualMFADevices
type ListVirtualMFADevicesResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
VirtualMFADevices VirtualMFADevices `json:"VirtualMFADevices" xml:"VirtualMFADevices"`
}
// CreateListVirtualMFADevicesRequest creates a request to invoke ListVirtualMFADevices API
func CreateListVirtualMFADevicesRequest() (request *ListVirtualMFADevicesRequest) {
request = &ListVirtualMFADevicesRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "ListVirtualMFADevices", "", "")
return
}
// CreateListVirtualMFADevicesResponse creates a response to parse from ListVirtualMFADevices response
func CreateListVirtualMFADevicesResponse() (response *ListVirtualMFADevicesResponse) {
response = &ListVirtualMFADevicesResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// RemoveUserFromGroup invokes the ram.RemoveUserFromGroup API synchronously
// api document: https://help.aliyun.com/api/ram/removeuserfromgroup.html
func (client *Client) RemoveUserFromGroup(request *RemoveUserFromGroupRequest) (response *RemoveUserFromGroupResponse, err error) {
response = CreateRemoveUserFromGroupResponse()
err = client.DoAction(request, response)
return
}
// RemoveUserFromGroupWithChan invokes the ram.RemoveUserFromGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/removeuserfromgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) RemoveUserFromGroupWithChan(request *RemoveUserFromGroupRequest) (<-chan *RemoveUserFromGroupResponse, <-chan error) {
responseChan := make(chan *RemoveUserFromGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.RemoveUserFromGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// RemoveUserFromGroupWithCallback invokes the ram.RemoveUserFromGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/removeuserfromgroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) RemoveUserFromGroupWithCallback(request *RemoveUserFromGroupRequest, callback func(response *RemoveUserFromGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *RemoveUserFromGroupResponse
var err error
defer close(result)
response, err = client.RemoveUserFromGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// RemoveUserFromGroupRequest is the request struct for api RemoveUserFromGroup
type RemoveUserFromGroupRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
GroupName string `position:"Query" name:"GroupName"`
}
// RemoveUserFromGroupResponse is the response struct for api RemoveUserFromGroup
type RemoveUserFromGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateRemoveUserFromGroupRequest creates a request to invoke RemoveUserFromGroup API
func CreateRemoveUserFromGroupRequest() (request *RemoveUserFromGroupRequest) {
request = &RemoveUserFromGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "RemoveUserFromGroup", "", "")
return
}
// CreateRemoveUserFromGroupResponse creates a response to parse from RemoveUserFromGroup response
func CreateRemoveUserFromGroupResponse() (response *RemoveUserFromGroupResponse) {
response = &RemoveUserFromGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,103 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// SetAccountAlias invokes the ram.SetAccountAlias API synchronously
// api document: https://help.aliyun.com/api/ram/setaccountalias.html
func (client *Client) SetAccountAlias(request *SetAccountAliasRequest) (response *SetAccountAliasResponse, err error) {
response = CreateSetAccountAliasResponse()
err = client.DoAction(request, response)
return
}
// SetAccountAliasWithChan invokes the ram.SetAccountAlias API asynchronously
// api document: https://help.aliyun.com/api/ram/setaccountalias.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) SetAccountAliasWithChan(request *SetAccountAliasRequest) (<-chan *SetAccountAliasResponse, <-chan error) {
responseChan := make(chan *SetAccountAliasResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.SetAccountAlias(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// SetAccountAliasWithCallback invokes the ram.SetAccountAlias API asynchronously
// api document: https://help.aliyun.com/api/ram/setaccountalias.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) SetAccountAliasWithCallback(request *SetAccountAliasRequest, callback func(response *SetAccountAliasResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *SetAccountAliasResponse
var err error
defer close(result)
response, err = client.SetAccountAlias(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// SetAccountAliasRequest is the request struct for api SetAccountAlias
type SetAccountAliasRequest struct {
*requests.RpcRequest
AccountAlias string `position:"Query" name:"AccountAlias"`
}
// SetAccountAliasResponse is the response struct for api SetAccountAlias
type SetAccountAliasResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateSetAccountAliasRequest creates a request to invoke SetAccountAlias API
func CreateSetAccountAliasRequest() (request *SetAccountAliasRequest) {
request = &SetAccountAliasRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "SetAccountAlias", "", "")
return
}
// CreateSetAccountAliasResponse creates a response to parse from SetAccountAlias response
func CreateSetAccountAliasResponse() (response *SetAccountAliasResponse) {
response = &SetAccountAliasResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// SetDefaultPolicyVersion invokes the ram.SetDefaultPolicyVersion API synchronously
// api document: https://help.aliyun.com/api/ram/setdefaultpolicyversion.html
func (client *Client) SetDefaultPolicyVersion(request *SetDefaultPolicyVersionRequest) (response *SetDefaultPolicyVersionResponse, err error) {
response = CreateSetDefaultPolicyVersionResponse()
err = client.DoAction(request, response)
return
}
// SetDefaultPolicyVersionWithChan invokes the ram.SetDefaultPolicyVersion API asynchronously
// api document: https://help.aliyun.com/api/ram/setdefaultpolicyversion.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) SetDefaultPolicyVersionWithChan(request *SetDefaultPolicyVersionRequest) (<-chan *SetDefaultPolicyVersionResponse, <-chan error) {
responseChan := make(chan *SetDefaultPolicyVersionResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.SetDefaultPolicyVersion(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// SetDefaultPolicyVersionWithCallback invokes the ram.SetDefaultPolicyVersion API asynchronously
// api document: https://help.aliyun.com/api/ram/setdefaultpolicyversion.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) SetDefaultPolicyVersionWithCallback(request *SetDefaultPolicyVersionRequest, callback func(response *SetDefaultPolicyVersionResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *SetDefaultPolicyVersionResponse
var err error
defer close(result)
response, err = client.SetDefaultPolicyVersion(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// SetDefaultPolicyVersionRequest is the request struct for api SetDefaultPolicyVersion
type SetDefaultPolicyVersionRequest struct {
*requests.RpcRequest
PolicyName string `position:"Query" name:"PolicyName"`
VersionId string `position:"Query" name:"VersionId"`
}
// SetDefaultPolicyVersionResponse is the response struct for api SetDefaultPolicyVersion
type SetDefaultPolicyVersionResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateSetDefaultPolicyVersionRequest creates a request to invoke SetDefaultPolicyVersion API
func CreateSetDefaultPolicyVersionRequest() (request *SetDefaultPolicyVersionRequest) {
request = &SetDefaultPolicyVersionRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "SetDefaultPolicyVersion", "", "")
return
}
// CreateSetDefaultPolicyVersionResponse creates a response to parse from SetDefaultPolicyVersion response
func CreateSetDefaultPolicyVersionResponse() (response *SetDefaultPolicyVersionResponse) {
response = &SetDefaultPolicyVersionResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,112 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// SetPasswordPolicy invokes the ram.SetPasswordPolicy API synchronously
// api document: https://help.aliyun.com/api/ram/setpasswordpolicy.html
func (client *Client) SetPasswordPolicy(request *SetPasswordPolicyRequest) (response *SetPasswordPolicyResponse, err error) {
response = CreateSetPasswordPolicyResponse()
err = client.DoAction(request, response)
return
}
// SetPasswordPolicyWithChan invokes the ram.SetPasswordPolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/setpasswordpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) SetPasswordPolicyWithChan(request *SetPasswordPolicyRequest) (<-chan *SetPasswordPolicyResponse, <-chan error) {
responseChan := make(chan *SetPasswordPolicyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.SetPasswordPolicy(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// SetPasswordPolicyWithCallback invokes the ram.SetPasswordPolicy API asynchronously
// api document: https://help.aliyun.com/api/ram/setpasswordpolicy.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) SetPasswordPolicyWithCallback(request *SetPasswordPolicyRequest, callback func(response *SetPasswordPolicyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *SetPasswordPolicyResponse
var err error
defer close(result)
response, err = client.SetPasswordPolicy(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// SetPasswordPolicyRequest is the request struct for api SetPasswordPolicy
type SetPasswordPolicyRequest struct {
*requests.RpcRequest
MinimumPasswordLength requests.Integer `position:"Query" name:"MinimumPasswordLength"`
RequireLowercaseCharacters requests.Boolean `position:"Query" name:"RequireLowercaseCharacters"`
RequireUppercaseCharacters requests.Boolean `position:"Query" name:"RequireUppercaseCharacters"`
RequireNumbers requests.Boolean `position:"Query" name:"RequireNumbers"`
RequireSymbols requests.Boolean `position:"Query" name:"RequireSymbols"`
HardExpiry requests.Boolean `position:"Query" name:"HardExpiry"`
MaxPasswordAge requests.Integer `position:"Query" name:"MaxPasswordAge"`
PasswordReusePrevention requests.Integer `position:"Query" name:"PasswordReusePrevention"`
MaxLoginAttemps requests.Integer `position:"Query" name:"MaxLoginAttemps"`
}
// SetPasswordPolicyResponse is the response struct for api SetPasswordPolicy
type SetPasswordPolicyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
PasswordPolicy PasswordPolicy `json:"PasswordPolicy" xml:"PasswordPolicy"`
}
// CreateSetPasswordPolicyRequest creates a request to invoke SetPasswordPolicy API
func CreateSetPasswordPolicyRequest() (request *SetPasswordPolicyRequest) {
request = &SetPasswordPolicyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "SetPasswordPolicy", "", "")
return
}
// CreateSetPasswordPolicyResponse creates a response to parse from SetPasswordPolicy response
func CreateSetPasswordPolicyResponse() (response *SetPasswordPolicyResponse) {
response = &SetPasswordPolicyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,110 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// SetSecurityPreference invokes the ram.SetSecurityPreference API synchronously
// api document: https://help.aliyun.com/api/ram/setsecuritypreference.html
func (client *Client) SetSecurityPreference(request *SetSecurityPreferenceRequest) (response *SetSecurityPreferenceResponse, err error) {
response = CreateSetSecurityPreferenceResponse()
err = client.DoAction(request, response)
return
}
// SetSecurityPreferenceWithChan invokes the ram.SetSecurityPreference API asynchronously
// api document: https://help.aliyun.com/api/ram/setsecuritypreference.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) SetSecurityPreferenceWithChan(request *SetSecurityPreferenceRequest) (<-chan *SetSecurityPreferenceResponse, <-chan error) {
responseChan := make(chan *SetSecurityPreferenceResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.SetSecurityPreference(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// SetSecurityPreferenceWithCallback invokes the ram.SetSecurityPreference API asynchronously
// api document: https://help.aliyun.com/api/ram/setsecuritypreference.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) SetSecurityPreferenceWithCallback(request *SetSecurityPreferenceRequest, callback func(response *SetSecurityPreferenceResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *SetSecurityPreferenceResponse
var err error
defer close(result)
response, err = client.SetSecurityPreference(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// SetSecurityPreferenceRequest is the request struct for api SetSecurityPreference
type SetSecurityPreferenceRequest struct {
*requests.RpcRequest
EnableSaveMFATicket requests.Boolean `position:"Query" name:"EnableSaveMFATicket"`
AllowUserToChangePassword requests.Boolean `position:"Query" name:"AllowUserToChangePassword"`
AllowUserToManageAccessKeys requests.Boolean `position:"Query" name:"AllowUserToManageAccessKeys"`
AllowUserToManagePublicKeys requests.Boolean `position:"Query" name:"AllowUserToManagePublicKeys"`
AllowUserToManageMFADevices requests.Boolean `position:"Query" name:"AllowUserToManageMFADevices"`
LoginSessionDuration requests.Integer `position:"Query" name:"LoginSessionDuration"`
LoginNetworkMasks string `position:"Query" name:"LoginNetworkMasks"`
}
// SetSecurityPreferenceResponse is the response struct for api SetSecurityPreference
type SetSecurityPreferenceResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
SecurityPreference SecurityPreference `json:"SecurityPreference" xml:"SecurityPreference"`
}
// CreateSetSecurityPreferenceRequest creates a request to invoke SetSecurityPreference API
func CreateSetSecurityPreferenceRequest() (request *SetSecurityPreferenceRequest) {
request = &SetSecurityPreferenceRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "SetSecurityPreference", "", "")
return
}
// CreateSetSecurityPreferenceResponse creates a response to parse from SetSecurityPreference response
func CreateSetSecurityPreferenceResponse() (response *SetSecurityPreferenceResponse) {
response = &SetSecurityPreferenceResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,24 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// AccessKey is a nested struct in ram response
type AccessKey struct {
CreateDate string `json:"CreateDate" xml:"CreateDate"`
AccessKeyId string `json:"AccessKeyId" xml:"AccessKeyId"`
AccessKeySecret string `json:"AccessKeySecret" xml:"AccessKeySecret"`
Status string `json:"Status" xml:"Status"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// AccessKeyPreference is a nested struct in ram response
type AccessKeyPreference struct {
AllowUserToManageAccessKeys bool `json:"AllowUserToManageAccessKeys" xml:"AllowUserToManageAccessKeys"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// AccessKeys is a nested struct in ram response
type AccessKeys struct {
AccessKey []AccessKey `json:"AccessKey" xml:"AccessKey"`
}

View File

@@ -0,0 +1,26 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Group is a nested struct in ram response
type Group struct {
CreateDate string `json:"CreateDate" xml:"CreateDate"`
Comments string `json:"Comments" xml:"Comments"`
AttachDate string `json:"AttachDate" xml:"AttachDate"`
GroupName string `json:"GroupName" xml:"GroupName"`
JoinDate string `json:"JoinDate" xml:"JoinDate"`
UpdateDate string `json:"UpdateDate" xml:"UpdateDate"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// GroupsInListEntitiesForPolicy is a nested struct in ram response
type GroupsInListEntitiesForPolicy struct {
Group []Group `json:"Group" xml:"Group"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// GroupsInListGroups is a nested struct in ram response
type GroupsInListGroups struct {
Group []Group `json:"Group" xml:"Group"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// GroupsInListGroupsForUser is a nested struct in ram response
type GroupsInListGroupsForUser struct {
Group []Group `json:"Group" xml:"Group"`
}

View File

@@ -0,0 +1,24 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// LoginProfile is a nested struct in ram response
type LoginProfile struct {
CreateDate string `json:"CreateDate" xml:"CreateDate"`
MFABindRequired bool `json:"MFABindRequired" xml:"MFABindRequired"`
UserName string `json:"UserName" xml:"UserName"`
PasswordResetRequired bool `json:"PasswordResetRequired" xml:"PasswordResetRequired"`
}

View File

@@ -0,0 +1,24 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// LoginProfilePreference is a nested struct in ram response
type LoginProfilePreference struct {
LoginSessionDuration int `json:"LoginSessionDuration" xml:"LoginSessionDuration"`
EnableSaveMFATicket bool `json:"EnableSaveMFATicket" xml:"EnableSaveMFATicket"`
LoginNetworkMasks string `json:"LoginNetworkMasks" xml:"LoginNetworkMasks"`
AllowUserToChangePassword bool `json:"AllowUserToChangePassword" xml:"AllowUserToChangePassword"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// MFADevice is a nested struct in ram response
type MFADevice struct {
SerialNumber string `json:"SerialNumber" xml:"SerialNumber"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// MFAPreference is a nested struct in ram response
type MFAPreference struct {
AllowUserToManageMFADevices bool `json:"AllowUserToManageMFADevices" xml:"AllowUserToManageMFADevices"`
}

View File

@@ -0,0 +1,29 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PasswordPolicy is a nested struct in ram response
type PasswordPolicy struct {
MaxPasswordAge int `json:"MaxPasswordAge" xml:"MaxPasswordAge"`
RequireNumbers bool `json:"RequireNumbers" xml:"RequireNumbers"`
RequireLowercaseCharacters bool `json:"RequireLowercaseCharacters" xml:"RequireLowercaseCharacters"`
HardExpiry bool `json:"HardExpiry" xml:"HardExpiry"`
RequireSymbols bool `json:"RequireSymbols" xml:"RequireSymbols"`
RequireUppercaseCharacters bool `json:"RequireUppercaseCharacters" xml:"RequireUppercaseCharacters"`
MaxLoginAttemps int `json:"MaxLoginAttemps" xml:"MaxLoginAttemps"`
MinimumPasswordLength int `json:"MinimumPasswordLength" xml:"MinimumPasswordLength"`
PasswordReusePrevention int `json:"PasswordReusePrevention" xml:"PasswordReusePrevention"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PoliciesInListPolicies is a nested struct in ram response
type PoliciesInListPolicies struct {
Policy []Policy `json:"Policy" xml:"Policy"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PoliciesInListPoliciesForGroup is a nested struct in ram response
type PoliciesInListPoliciesForGroup struct {
Policy []Policy `json:"Policy" xml:"Policy"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PoliciesInListPoliciesForRole is a nested struct in ram response
type PoliciesInListPoliciesForRole struct {
Policy []Policy `json:"Policy" xml:"Policy"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PoliciesInListPoliciesForUser is a nested struct in ram response
type PoliciesInListPoliciesForUser struct {
Policy []Policy `json:"Policy" xml:"Policy"`
}

View File

@@ -0,0 +1,29 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Policy is a nested struct in ram response
type Policy struct {
CreateDate string `json:"CreateDate" xml:"CreateDate"`
PolicyType string `json:"PolicyType" xml:"PolicyType"`
PolicyDocument string `json:"PolicyDocument" xml:"PolicyDocument"`
Description string `json:"Description" xml:"Description"`
AttachmentCount int `json:"AttachmentCount" xml:"AttachmentCount"`
AttachDate string `json:"AttachDate" xml:"AttachDate"`
DefaultVersion string `json:"DefaultVersion" xml:"DefaultVersion"`
PolicyName string `json:"PolicyName" xml:"PolicyName"`
UpdateDate string `json:"UpdateDate" xml:"UpdateDate"`
}

View File

@@ -0,0 +1,24 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PolicyVersion is a nested struct in ram response
type PolicyVersion struct {
CreateDate string `json:"CreateDate" xml:"CreateDate"`
PolicyDocument string `json:"PolicyDocument" xml:"PolicyDocument"`
VersionId string `json:"VersionId" xml:"VersionId"`
IsDefaultVersion bool `json:"IsDefaultVersion" xml:"IsDefaultVersion"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PolicyVersions is a nested struct in ram response
type PolicyVersions struct {
PolicyVersion []PolicyVersion `json:"PolicyVersion" xml:"PolicyVersion"`
}

View File

@@ -0,0 +1,24 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PublicKey is a nested struct in ram response
type PublicKey struct {
CreateDate string `json:"CreateDate" xml:"CreateDate"`
PublicKeySpec string `json:"PublicKeySpec" xml:"PublicKeySpec"`
PublicKeyId string `json:"PublicKeyId" xml:"PublicKeyId"`
Status string `json:"Status" xml:"Status"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PublicKeyPreference is a nested struct in ram response
type PublicKeyPreference struct {
AllowUserToManagePublicKeys bool `json:"AllowUserToManagePublicKeys" xml:"AllowUserToManagePublicKeys"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PublicKeys is a nested struct in ram response
type PublicKeys struct {
PublicKey []PublicKey `json:"PublicKey" xml:"PublicKey"`
}

View File

@@ -0,0 +1,28 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Role is a nested struct in ram response
type Role struct {
CreateDate string `json:"CreateDate" xml:"CreateDate"`
AssumeRolePolicyDocument string `json:"AssumeRolePolicyDocument" xml:"AssumeRolePolicyDocument"`
RoleId string `json:"RoleId" xml:"RoleId"`
RoleName string `json:"RoleName" xml:"RoleName"`
Description string `json:"Description" xml:"Description"`
AttachDate string `json:"AttachDate" xml:"AttachDate"`
Arn string `json:"Arn" xml:"Arn"`
UpdateDate string `json:"UpdateDate" xml:"UpdateDate"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// RolesInListEntitiesForPolicy is a nested struct in ram response
type RolesInListEntitiesForPolicy struct {
Role []Role `json:"Role" xml:"Role"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// RolesInListRoles is a nested struct in ram response
type RolesInListRoles struct {
Role []Role `json:"Role" xml:"Role"`
}

View File

@@ -0,0 +1,24 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// SecurityPreference is a nested struct in ram response
type SecurityPreference struct {
LoginProfilePreference LoginProfilePreference `json:"LoginProfilePreference" xml:"LoginProfilePreference"`
PublicKeyPreference PublicKeyPreference `json:"PublicKeyPreference" xml:"PublicKeyPreference"`
MFAPreference MFAPreference `json:"MFAPreference" xml:"MFAPreference"`
AccessKeyPreference AccessKeyPreference `json:"AccessKeyPreference" xml:"AccessKeyPreference"`
}

View File

@@ -0,0 +1,31 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// User is a nested struct in ram response
type User struct {
CreateDate string `json:"CreateDate" xml:"CreateDate"`
Email string `json:"Email" xml:"Email"`
UserId string `json:"UserId" xml:"UserId"`
Comments string `json:"Comments" xml:"Comments"`
DisplayName string `json:"DisplayName" xml:"DisplayName"`
LastLoginDate string `json:"LastLoginDate" xml:"LastLoginDate"`
MobilePhone string `json:"MobilePhone" xml:"MobilePhone"`
UserName string `json:"UserName" xml:"UserName"`
AttachDate string `json:"AttachDate" xml:"AttachDate"`
JoinDate string `json:"JoinDate" xml:"JoinDate"`
UpdateDate string `json:"UpdateDate" xml:"UpdateDate"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UsersInListEntitiesForPolicy is a nested struct in ram response
type UsersInListEntitiesForPolicy struct {
User []User `json:"User" xml:"User"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UsersInListUsers is a nested struct in ram response
type UsersInListUsers struct {
User []User `json:"User" xml:"User"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// UsersInListUsersForGroup is a nested struct in ram response
type UsersInListUsersForGroup struct {
User []User `json:"User" xml:"User"`
}

View File

@@ -0,0 +1,25 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// VirtualMFADevice is a nested struct in ram response
type VirtualMFADevice struct {
ActivateDate string `json:"ActivateDate" xml:"ActivateDate"`
SerialNumber string `json:"SerialNumber" xml:"SerialNumber"`
QRCodePNG string `json:"QRCodePNG" xml:"QRCodePNG"`
Base32StringSeed string `json:"Base32StringSeed" xml:"Base32StringSeed"`
User User `json:"User" xml:"User"`
}

View File

@@ -0,0 +1,21 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// VirtualMFADevices is a nested struct in ram response
type VirtualMFADevices struct {
VirtualMFADevice []VirtualMFADevice `json:"VirtualMFADevice" xml:"VirtualMFADevice"`
}

View File

@@ -0,0 +1,104 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// UnbindMFADevice invokes the ram.UnbindMFADevice API synchronously
// api document: https://help.aliyun.com/api/ram/unbindmfadevice.html
func (client *Client) UnbindMFADevice(request *UnbindMFADeviceRequest) (response *UnbindMFADeviceResponse, err error) {
response = CreateUnbindMFADeviceResponse()
err = client.DoAction(request, response)
return
}
// UnbindMFADeviceWithChan invokes the ram.UnbindMFADevice API asynchronously
// api document: https://help.aliyun.com/api/ram/unbindmfadevice.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UnbindMFADeviceWithChan(request *UnbindMFADeviceRequest) (<-chan *UnbindMFADeviceResponse, <-chan error) {
responseChan := make(chan *UnbindMFADeviceResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.UnbindMFADevice(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// UnbindMFADeviceWithCallback invokes the ram.UnbindMFADevice API asynchronously
// api document: https://help.aliyun.com/api/ram/unbindmfadevice.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UnbindMFADeviceWithCallback(request *UnbindMFADeviceRequest, callback func(response *UnbindMFADeviceResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *UnbindMFADeviceResponse
var err error
defer close(result)
response, err = client.UnbindMFADevice(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// UnbindMFADeviceRequest is the request struct for api UnbindMFADevice
type UnbindMFADeviceRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
}
// UnbindMFADeviceResponse is the response struct for api UnbindMFADevice
type UnbindMFADeviceResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
MFADevice MFADevice `json:"MFADevice" xml:"MFADevice"`
}
// CreateUnbindMFADeviceRequest creates a request to invoke UnbindMFADevice API
func CreateUnbindMFADeviceRequest() (request *UnbindMFADeviceRequest) {
request = &UnbindMFADeviceRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "UnbindMFADevice", "", "")
return
}
// CreateUnbindMFADeviceResponse creates a response to parse from UnbindMFADevice response
func CreateUnbindMFADeviceResponse() (response *UnbindMFADeviceResponse) {
response = &UnbindMFADeviceResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// UpdateAccessKey invokes the ram.UpdateAccessKey API synchronously
// api document: https://help.aliyun.com/api/ram/updateaccesskey.html
func (client *Client) UpdateAccessKey(request *UpdateAccessKeyRequest) (response *UpdateAccessKeyResponse, err error) {
response = CreateUpdateAccessKeyResponse()
err = client.DoAction(request, response)
return
}
// UpdateAccessKeyWithChan invokes the ram.UpdateAccessKey API asynchronously
// api document: https://help.aliyun.com/api/ram/updateaccesskey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateAccessKeyWithChan(request *UpdateAccessKeyRequest) (<-chan *UpdateAccessKeyResponse, <-chan error) {
responseChan := make(chan *UpdateAccessKeyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.UpdateAccessKey(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// UpdateAccessKeyWithCallback invokes the ram.UpdateAccessKey API asynchronously
// api document: https://help.aliyun.com/api/ram/updateaccesskey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateAccessKeyWithCallback(request *UpdateAccessKeyRequest, callback func(response *UpdateAccessKeyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *UpdateAccessKeyResponse
var err error
defer close(result)
response, err = client.UpdateAccessKey(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// UpdateAccessKeyRequest is the request struct for api UpdateAccessKey
type UpdateAccessKeyRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
UserAccessKeyId string `position:"Query" name:"UserAccessKeyId"`
Status string `position:"Query" name:"Status"`
}
// UpdateAccessKeyResponse is the response struct for api UpdateAccessKey
type UpdateAccessKeyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateUpdateAccessKeyRequest creates a request to invoke UpdateAccessKey API
func CreateUpdateAccessKeyRequest() (request *UpdateAccessKeyRequest) {
request = &UpdateAccessKeyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "UpdateAccessKey", "", "")
return
}
// CreateUpdateAccessKeyResponse creates a response to parse from UpdateAccessKey response
func CreateUpdateAccessKeyResponse() (response *UpdateAccessKeyResponse) {
response = &UpdateAccessKeyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,106 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// UpdateGroup invokes the ram.UpdateGroup API synchronously
// api document: https://help.aliyun.com/api/ram/updategroup.html
func (client *Client) UpdateGroup(request *UpdateGroupRequest) (response *UpdateGroupResponse, err error) {
response = CreateUpdateGroupResponse()
err = client.DoAction(request, response)
return
}
// UpdateGroupWithChan invokes the ram.UpdateGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/updategroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateGroupWithChan(request *UpdateGroupRequest) (<-chan *UpdateGroupResponse, <-chan error) {
responseChan := make(chan *UpdateGroupResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.UpdateGroup(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// UpdateGroupWithCallback invokes the ram.UpdateGroup API asynchronously
// api document: https://help.aliyun.com/api/ram/updategroup.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateGroupWithCallback(request *UpdateGroupRequest, callback func(response *UpdateGroupResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *UpdateGroupResponse
var err error
defer close(result)
response, err = client.UpdateGroup(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// UpdateGroupRequest is the request struct for api UpdateGroup
type UpdateGroupRequest struct {
*requests.RpcRequest
GroupName string `position:"Query" name:"GroupName"`
NewGroupName string `position:"Query" name:"NewGroupName"`
NewComments string `position:"Query" name:"NewComments"`
}
// UpdateGroupResponse is the response struct for api UpdateGroup
type UpdateGroupResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Group Group `json:"Group" xml:"Group"`
}
// CreateUpdateGroupRequest creates a request to invoke UpdateGroup API
func CreateUpdateGroupRequest() (request *UpdateGroupRequest) {
request = &UpdateGroupRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "UpdateGroup", "", "")
return
}
// CreateUpdateGroupResponse creates a response to parse from UpdateGroup response
func CreateUpdateGroupResponse() (response *UpdateGroupResponse) {
response = &UpdateGroupResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,106 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// UpdateLoginProfile invokes the ram.UpdateLoginProfile API synchronously
// api document: https://help.aliyun.com/api/ram/updateloginprofile.html
func (client *Client) UpdateLoginProfile(request *UpdateLoginProfileRequest) (response *UpdateLoginProfileResponse, err error) {
response = CreateUpdateLoginProfileResponse()
err = client.DoAction(request, response)
return
}
// UpdateLoginProfileWithChan invokes the ram.UpdateLoginProfile API asynchronously
// api document: https://help.aliyun.com/api/ram/updateloginprofile.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateLoginProfileWithChan(request *UpdateLoginProfileRequest) (<-chan *UpdateLoginProfileResponse, <-chan error) {
responseChan := make(chan *UpdateLoginProfileResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.UpdateLoginProfile(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// UpdateLoginProfileWithCallback invokes the ram.UpdateLoginProfile API asynchronously
// api document: https://help.aliyun.com/api/ram/updateloginprofile.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateLoginProfileWithCallback(request *UpdateLoginProfileRequest, callback func(response *UpdateLoginProfileResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *UpdateLoginProfileResponse
var err error
defer close(result)
response, err = client.UpdateLoginProfile(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// UpdateLoginProfileRequest is the request struct for api UpdateLoginProfile
type UpdateLoginProfileRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
Password string `position:"Query" name:"Password"`
PasswordResetRequired requests.Boolean `position:"Query" name:"PasswordResetRequired"`
MFABindRequired requests.Boolean `position:"Query" name:"MFABindRequired"`
}
// UpdateLoginProfileResponse is the response struct for api UpdateLoginProfile
type UpdateLoginProfileResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateUpdateLoginProfileRequest creates a request to invoke UpdateLoginProfile API
func CreateUpdateLoginProfileRequest() (request *UpdateLoginProfileRequest) {
request = &UpdateLoginProfileRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "UpdateLoginProfile", "", "")
return
}
// CreateUpdateLoginProfileResponse creates a response to parse from UpdateLoginProfile response
func CreateUpdateLoginProfileResponse() (response *UpdateLoginProfileResponse) {
response = &UpdateLoginProfileResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// UpdatePublicKey invokes the ram.UpdatePublicKey API synchronously
// api document: https://help.aliyun.com/api/ram/updatepublickey.html
func (client *Client) UpdatePublicKey(request *UpdatePublicKeyRequest) (response *UpdatePublicKeyResponse, err error) {
response = CreateUpdatePublicKeyResponse()
err = client.DoAction(request, response)
return
}
// UpdatePublicKeyWithChan invokes the ram.UpdatePublicKey API asynchronously
// api document: https://help.aliyun.com/api/ram/updatepublickey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdatePublicKeyWithChan(request *UpdatePublicKeyRequest) (<-chan *UpdatePublicKeyResponse, <-chan error) {
responseChan := make(chan *UpdatePublicKeyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.UpdatePublicKey(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// UpdatePublicKeyWithCallback invokes the ram.UpdatePublicKey API asynchronously
// api document: https://help.aliyun.com/api/ram/updatepublickey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdatePublicKeyWithCallback(request *UpdatePublicKeyRequest, callback func(response *UpdatePublicKeyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *UpdatePublicKeyResponse
var err error
defer close(result)
response, err = client.UpdatePublicKey(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// UpdatePublicKeyRequest is the request struct for api UpdatePublicKey
type UpdatePublicKeyRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
UserPublicKeyId string `position:"Query" name:"UserPublicKeyId"`
Status string `position:"Query" name:"Status"`
}
// UpdatePublicKeyResponse is the response struct for api UpdatePublicKey
type UpdatePublicKeyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
}
// CreateUpdatePublicKeyRequest creates a request to invoke UpdatePublicKey API
func CreateUpdatePublicKeyRequest() (request *UpdatePublicKeyRequest) {
request = &UpdatePublicKeyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "UpdatePublicKey", "", "")
return
}
// CreateUpdatePublicKeyResponse creates a response to parse from UpdatePublicKey response
func CreateUpdatePublicKeyResponse() (response *UpdatePublicKeyResponse) {
response = &UpdatePublicKeyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// UpdateRole invokes the ram.UpdateRole API synchronously
// api document: https://help.aliyun.com/api/ram/updaterole.html
func (client *Client) UpdateRole(request *UpdateRoleRequest) (response *UpdateRoleResponse, err error) {
response = CreateUpdateRoleResponse()
err = client.DoAction(request, response)
return
}
// UpdateRoleWithChan invokes the ram.UpdateRole API asynchronously
// api document: https://help.aliyun.com/api/ram/updaterole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateRoleWithChan(request *UpdateRoleRequest) (<-chan *UpdateRoleResponse, <-chan error) {
responseChan := make(chan *UpdateRoleResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.UpdateRole(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// UpdateRoleWithCallback invokes the ram.UpdateRole API asynchronously
// api document: https://help.aliyun.com/api/ram/updaterole.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateRoleWithCallback(request *UpdateRoleRequest, callback func(response *UpdateRoleResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *UpdateRoleResponse
var err error
defer close(result)
response, err = client.UpdateRole(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// UpdateRoleRequest is the request struct for api UpdateRole
type UpdateRoleRequest struct {
*requests.RpcRequest
RoleName string `position:"Query" name:"RoleName"`
NewAssumeRolePolicyDocument string `position:"Query" name:"NewAssumeRolePolicyDocument"`
}
// UpdateRoleResponse is the response struct for api UpdateRole
type UpdateRoleResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
Role Role `json:"Role" xml:"Role"`
}
// CreateUpdateRoleRequest creates a request to invoke UpdateRole API
func CreateUpdateRoleRequest() (request *UpdateRoleRequest) {
request = &UpdateRoleRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "UpdateRole", "", "")
return
}
// CreateUpdateRoleResponse creates a response to parse from UpdateRole response
func CreateUpdateRoleResponse() (response *UpdateRoleResponse) {
response = &UpdateRoleResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,109 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// UpdateUser invokes the ram.UpdateUser API synchronously
// api document: https://help.aliyun.com/api/ram/updateuser.html
func (client *Client) UpdateUser(request *UpdateUserRequest) (response *UpdateUserResponse, err error) {
response = CreateUpdateUserResponse()
err = client.DoAction(request, response)
return
}
// UpdateUserWithChan invokes the ram.UpdateUser API asynchronously
// api document: https://help.aliyun.com/api/ram/updateuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateUserWithChan(request *UpdateUserRequest) (<-chan *UpdateUserResponse, <-chan error) {
responseChan := make(chan *UpdateUserResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.UpdateUser(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// UpdateUserWithCallback invokes the ram.UpdateUser API asynchronously
// api document: https://help.aliyun.com/api/ram/updateuser.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UpdateUserWithCallback(request *UpdateUserRequest, callback func(response *UpdateUserResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *UpdateUserResponse
var err error
defer close(result)
response, err = client.UpdateUser(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// UpdateUserRequest is the request struct for api UpdateUser
type UpdateUserRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
NewUserName string `position:"Query" name:"NewUserName"`
NewDisplayName string `position:"Query" name:"NewDisplayName"`
NewMobilePhone string `position:"Query" name:"NewMobilePhone"`
NewEmail string `position:"Query" name:"NewEmail"`
NewComments string `position:"Query" name:"NewComments"`
}
// UpdateUserResponse is the response struct for api UpdateUser
type UpdateUserResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
User User `json:"User" xml:"User"`
}
// CreateUpdateUserRequest creates a request to invoke UpdateUser API
func CreateUpdateUserRequest() (request *UpdateUserRequest) {
request = &UpdateUserRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "UpdateUser", "", "")
return
}
// CreateUpdateUserResponse creates a response to parse from UpdateUser response
func CreateUpdateUserResponse() (response *UpdateUserResponse) {
response = &UpdateUserResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,105 @@
package ram
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)
// UploadPublicKey invokes the ram.UploadPublicKey API synchronously
// api document: https://help.aliyun.com/api/ram/uploadpublickey.html
func (client *Client) UploadPublicKey(request *UploadPublicKeyRequest) (response *UploadPublicKeyResponse, err error) {
response = CreateUploadPublicKeyResponse()
err = client.DoAction(request, response)
return
}
// UploadPublicKeyWithChan invokes the ram.UploadPublicKey API asynchronously
// api document: https://help.aliyun.com/api/ram/uploadpublickey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UploadPublicKeyWithChan(request *UploadPublicKeyRequest) (<-chan *UploadPublicKeyResponse, <-chan error) {
responseChan := make(chan *UploadPublicKeyResponse, 1)
errChan := make(chan error, 1)
err := client.AddAsyncTask(func() {
defer close(responseChan)
defer close(errChan)
response, err := client.UploadPublicKey(request)
if err != nil {
errChan <- err
} else {
responseChan <- response
}
})
if err != nil {
errChan <- err
close(responseChan)
close(errChan)
}
return responseChan, errChan
}
// UploadPublicKeyWithCallback invokes the ram.UploadPublicKey API asynchronously
// api document: https://help.aliyun.com/api/ram/uploadpublickey.html
// asynchronous document: https://help.aliyun.com/document_detail/66220.html
func (client *Client) UploadPublicKeyWithCallback(request *UploadPublicKeyRequest, callback func(response *UploadPublicKeyResponse, err error)) <-chan int {
result := make(chan int, 1)
err := client.AddAsyncTask(func() {
var response *UploadPublicKeyResponse
var err error
defer close(result)
response, err = client.UploadPublicKey(request)
callback(response, err)
result <- 1
})
if err != nil {
defer close(result)
callback(nil, err)
result <- 0
}
return result
}
// UploadPublicKeyRequest is the request struct for api UploadPublicKey
type UploadPublicKeyRequest struct {
*requests.RpcRequest
UserName string `position:"Query" name:"UserName"`
PublicKeySpec string `position:"Query" name:"PublicKeySpec"`
}
// UploadPublicKeyResponse is the response struct for api UploadPublicKey
type UploadPublicKeyResponse struct {
*responses.BaseResponse
RequestId string `json:"RequestId" xml:"RequestId"`
PublicKey PublicKey `json:"PublicKey" xml:"PublicKey"`
}
// CreateUploadPublicKeyRequest creates a request to invoke UploadPublicKey API
func CreateUploadPublicKeyRequest() (request *UploadPublicKeyRequest) {
request = &UploadPublicKeyRequest{
RpcRequest: &requests.RpcRequest{},
}
request.InitWithApiInfo("Ram", "2015-05-01", "UploadPublicKey", "", "")
return
}
// CreateUploadPublicKeyResponse creates a response to parse from UploadPublicKey response
func CreateUploadPublicKeyResponse() (response *UploadPublicKeyResponse) {
response = &UploadPublicKeyResponse{
BaseResponse: &responses.BaseResponse{},
}
return
}

View File

@@ -0,0 +1,415 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
branch = "master"
digest = "1:e26170d7ec7d444d7b74a5b1dbd6437fd8e552d27efce9327f733311737c4ae9"
name = "github.com/SermoDigital/jose"
packages = [
".",
"crypto",
"jws",
"jwt",
]
pruneopts = "UT"
revision = "803625baeddc3526d01d321b5066029f53eafc81"
[[projects]]
digest = "1:309704ec478c46e59bc84e0968ce7ab3707cef00c26c1f1bc058e3d1d26afadb"
name = "github.com/aliyun/alibaba-cloud-sdk-go"
packages = [
"sdk",
"sdk/auth",
"sdk/auth/credentials",
"sdk/auth/credentials/providers",
"sdk/auth/signers",
"sdk/endpoints",
"sdk/errors",
"sdk/requests",
"sdk/responses",
"sdk/utils",
"services/ram",
"services/sts",
]
pruneopts = "UT"
revision = "ef9535c490beb6b59620d93f6c7ba88e9b3b1ad0"
version = "1.26.2"
[[projects]]
digest = "1:9fd3a6ab34bb103ba228eefd044d3f9aa476237ea95a46d12e8cccd3abf3fea2"
name = "github.com/armon/go-radix"
packages = ["."]
pruneopts = "UT"
revision = "1fca145dffbcaa8fe914309b1ec0cfc67500fe61"
[[projects]]
digest = "1:17fe264ee908afc795734e8c4e63db2accabaf57326dbf21763a7d6b86096260"
name = "github.com/golang/protobuf"
packages = [
"proto",
"ptypes",
"ptypes/any",
"ptypes/duration",
"ptypes/timestamp",
]
pruneopts = "UT"
revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265"
version = "v1.1.0"
[[projects]]
branch = "master"
digest = "1:4a0c6bb4805508a6287675fac876be2ac1182539ca8a32468d8128882e9d5009"
name = "github.com/golang/snappy"
packages = ["."]
pruneopts = "UT"
revision = "2e65f85255dbc3072edf28d6b5b8efc472979f5a"
[[projects]]
digest = "1:07671f8997086ed115824d1974507d2b147d1e0463675ea5dbf3be89b1c2c563"
name = "github.com/hashicorp/errwrap"
packages = ["."]
pruneopts = "UT"
revision = "7554cd9344cec97297fa6649b055a8c98c2a1e55"
[[projects]]
branch = "master"
digest = "1:77cb3be9b21ba7f1a4701e870c84ea8b66e7d74c7c8951c58155fdadae9414ec"
name = "github.com/hashicorp/go-cleanhttp"
packages = ["."]
pruneopts = "UT"
revision = "d5fe4b57a186c716b0e00b8c301cbd9b4182694d"
[[projects]]
branch = "master"
digest = "1:e8d99882caa8c74d68f340ddb9bba3f7e433117ce57c3e52501edfa7e195d2c7"
name = "github.com/hashicorp/go-hclog"
packages = ["."]
pruneopts = "UT"
revision = "ff2cf002a8dd750586d91dddd4470c341f981fe1"
[[projects]]
branch = "master"
digest = "1:2394f5a25132b3868eff44599cc28d44bdd0330806e34c495d754dd052df612b"
name = "github.com/hashicorp/go-immutable-radix"
packages = ["."]
pruneopts = "UT"
revision = "7f3cd4390caab3250a57f30efdb2a65dd7649ecf"
[[projects]]
digest = "1:e5048c5da80697be2fcdecc944e29d2999e01fd7f48b643168443209779f3463"
name = "github.com/hashicorp/go-multierror"
packages = ["."]
pruneopts = "UT"
revision = "b7773ae218740a7be65057fc60b366a49b538a44"
[[projects]]
branch = "master"
digest = "1:82320f8469d1524df337bc315a38c87644765cd89ec4cf3cbda249a3acdde671"
name = "github.com/hashicorp/go-plugin"
packages = ["."]
pruneopts = "UT"
revision = "e8d22c780116115ae5624720c9af0c97afe4f551"
[[projects]]
branch = "master"
digest = "1:183f00c472fb9b2446659618eebf4899872fa267b92f926539411abdc8b941df"
name = "github.com/hashicorp/go-retryablehttp"
packages = ["."]
pruneopts = "UT"
revision = "e651d75abec6fbd4f2c09508f72ae7af8a8b7171"
[[projects]]
branch = "master"
digest = "1:45aad874d3c7d5e8610427c81870fb54970b981692930ec2a319ce4cb89d7a00"
name = "github.com/hashicorp/go-rootcerts"
packages = ["."]
pruneopts = "UT"
revision = "6bb64b370b90e7ef1fa532be9e591a81c3493e00"
[[projects]]
branch = "master"
digest = "1:14f2005c31ddf99c4a0f36fc440f8d1ac43224194c7c4a904b3c8f4ba5654d0b"
name = "github.com/hashicorp/go-sockaddr"
packages = ["."]
pruneopts = "UT"
revision = "6d291a969b86c4b633730bfc6b8b9d64c3aafed9"
[[projects]]
branch = "master"
digest = "1:354978aad16c56c27f57e5b152224806d87902e4935da3b03e18263d82ae77aa"
name = "github.com/hashicorp/go-uuid"
packages = ["."]
pruneopts = "UT"
revision = "27454136f0364f2d44b1276c552d69105cf8c498"
[[projects]]
digest = "1:e12b92b8bb20af6e299e9829534cfe790857702a988d3f0443e772c9d82a4fd2"
name = "github.com/hashicorp/go-version"
packages = ["."]
pruneopts = "UT"
revision = "23480c0665776210b5fbbac6eaaee40e3e6a96b7"
[[projects]]
branch = "master"
digest = "1:cf296baa185baae04a9a7004efee8511d08e2f5f51d4cbe5375da89722d681db"
name = "github.com/hashicorp/golang-lru"
packages = [
".",
"simplelru",
]
pruneopts = "UT"
revision = "0fb14efe8c47ae851c0034ed7a448854d3d34cf3"
[[projects]]
branch = "master"
digest = "1:12247a2e99a060cc692f6680e5272c8adf0b8f572e6bce0d7095e624c958a240"
name = "github.com/hashicorp/hcl"
packages = [
".",
"hcl/ast",
"hcl/parser",
"hcl/scanner",
"hcl/strconv",
"hcl/token",
"json/parser",
"json/scanner",
"json/token",
]
pruneopts = "UT"
revision = "ef8a98b0bbce4a65b5aa4c368430a80ddc533168"
[[projects]]
digest = "1:4be4315ec4768c829b2bc87c7e28dbb2420e831e242770d845833c13bb658d70"
name = "github.com/hashicorp/vault"
packages = [
"api",
"helper/certutil",
"helper/compressutil",
"helper/consts",
"helper/errutil",
"helper/hclutil",
"helper/jsonutil",
"helper/locksutil",
"helper/logging",
"helper/mlock",
"helper/parseutil",
"helper/pathmanager",
"helper/pluginutil",
"helper/salt",
"helper/strutil",
"helper/wrapping",
"logical",
"logical/framework",
"logical/plugin",
"logical/plugin/pb",
"physical",
"physical/inmem",
"version",
]
pruneopts = "UT"
revision = "e21712a687889de1125e0a12a980420b1a4f72d3"
version = "v0.10.4"
[[projects]]
branch = "master"
digest = "1:89658943622e6bc5e76b4da027ee9583fa0b321db0c797bd554edab96c1ca2b1"
name = "github.com/hashicorp/yamux"
packages = ["."]
pruneopts = "UT"
revision = "3520598351bb3500a49ae9563f5539666ae0a27c"
[[projects]]
digest = "1:b87714e57a511d88f307aba7d5b63522da12bed0a050889c81272fc50f71100e"
name = "github.com/jmespath/go-jmespath"
packages = ["."]
pruneopts = "UT"
revision = "3433f3ea46d9f8019119e7dd41274e112a2359a9"
version = "0.2.2"
[[projects]]
digest = "1:3e551bbb3a7c0ab2a2bf4660e7fcad16db089fdcfbb44b0199e62838038623ea"
name = "github.com/json-iterator/go"
packages = ["."]
pruneopts = "UT"
revision = "1624edc4454b8682399def8740d46db5e4362ba4"
version = "1.1.5"
[[projects]]
branch = "master"
digest = "1:c7354463195544b1ab3c1f1fadb41430947f5d28dfbf2cdbd38268c5717a5a03"
name = "github.com/mitchellh/go-homedir"
packages = ["."]
pruneopts = "UT"
revision = "58046073cbffe2f25d425fe1331102f55cf719de"
[[projects]]
branch = "master"
digest = "1:cae1afe858922bd10e9573b87130f730a6e4183a00eba79920d6656629468bfa"
name = "github.com/mitchellh/go-testing-interface"
packages = ["."]
pruneopts = "UT"
revision = "a61a99592b77c9ba629d254a693acffaeb4b7e28"
[[projects]]
digest = "1:e730597b38a4d56e2361e0b6236cb800e52c73cace2ff91396f4ff35792ddfa7"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
pruneopts = "UT"
revision = "bb74f1db0675b241733089d5a1faa5dd8b0ef57b"
[[projects]]
digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563"
name = "github.com/modern-go/concurrent"
packages = ["."]
pruneopts = "UT"
revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94"
version = "1.0.3"
[[projects]]
digest = "1:e32bdbdb7c377a07a9a46378290059822efdce5c8d96fe71940d87cb4f918855"
name = "github.com/modern-go/reflect2"
packages = ["."]
pruneopts = "UT"
revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd"
version = "1.0.1"
[[projects]]
digest = "1:9ec6cf1df5ad1d55cf41a43b6b1e7e118a91bade4f68ff4303379343e40c0e25"
name = "github.com/oklog/run"
packages = ["."]
pruneopts = "UT"
revision = "4dadeb3030eda0273a12382bb2348ffc7c9d1a39"
version = "v1.0.0"
[[projects]]
branch = "master"
digest = "1:5b92d232e81c3e8eec282c92dcaa2e0e1ad3c23157be19a01b3e33f7e6e8d137"
name = "github.com/ryanuber/go-glob"
packages = ["."]
pruneopts = "UT"
revision = "256dc444b735e061061cf46c809487313d5b0065"
[[projects]]
digest = "1:274f67cb6fed9588ea2521ecdac05a6d62a8c51c074c1fccc6a49a40ba80e925"
name = "github.com/satori/go.uuid"
packages = ["."]
pruneopts = "UT"
revision = "f58768cc1a7a7e77a3bd49e98cdd21419399b6a3"
version = "v1.2.0"
[[projects]]
digest = "1:2131278c6fb9a84f2da205d35fdace38c530c2f9394342c52476cb4d23b50ffb"
name = "golang.org/x/net"
packages = [
"context",
"http/httpguts",
"http2",
"http2/hpack",
"idna",
"internal/timeseries",
"trace",
]
pruneopts = "UT"
revision = "039a4258aec0ad3c79b905677cceeab13b296a77"
[[projects]]
digest = "1:d773e525476aefa22ea944a5425a9bfb99819b2e67eeb9b1966454fd57522bbf"
name = "golang.org/x/sys"
packages = ["unix"]
pruneopts = "UT"
revision = "1b2967e3c290b7c545b3db0deeda16e9be4f98a2"
[[projects]]
digest = "1:a2ab62866c75542dd18d2b069fec854577a20211d7c0ea6ae746072a1dccdd18"
name = "golang.org/x/text"
packages = [
"collate",
"collate/build",
"internal/colltab",
"internal/gen",
"internal/tag",
"internal/triegen",
"internal/ucd",
"language",
"secure/bidirule",
"transform",
"unicode/bidi",
"unicode/cldr",
"unicode/norm",
"unicode/rangetable",
]
pruneopts = "UT"
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
version = "v0.3.0"
[[projects]]
branch = "master"
digest = "1:c9e7a4b4d47c0ed205d257648b0e5b0440880cb728506e318f8ac7cd36270bc4"
name = "golang.org/x/time"
packages = ["rate"]
pruneopts = "UT"
revision = "fbb02b2291d28baffd63558aa44b4b56f178d650"
[[projects]]
branch = "master"
digest = "1:077c1c599507b3b3e9156d17d36e1e61928ee9b53a5b420f10f28ebd4a0b275c"
name = "google.golang.org/genproto"
packages = ["googleapis/rpc/status"]
pruneopts = "UT"
revision = "383e8b2c3b9e36c4076b235b32537292176bae20"
[[projects]]
digest = "1:5c64b5dd01a6d9dbcf4c160b9a36996605c79f39b46ea7570b3d861dbc71f641"
name = "google.golang.org/grpc"
packages = [
".",
"balancer",
"balancer/base",
"balancer/roundrobin",
"codes",
"connectivity",
"credentials",
"encoding",
"encoding/proto",
"grpclog",
"health",
"health/grpc_health_v1",
"internal",
"internal/backoff",
"internal/channelz",
"internal/envconfig",
"internal/grpcrand",
"internal/transport",
"keepalive",
"metadata",
"naming",
"peer",
"resolver",
"resolver/dns",
"resolver/passthrough",
"stats",
"status",
"tap",
]
pruneopts = "UT"
revision = "11b582728a13ef54e14e4fa930d693de2e32420f"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/aliyun/alibaba-cloud-sdk-go/sdk",
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth",
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials/providers",
"github.com/aliyun/alibaba-cloud-sdk-go/services/ram",
"github.com/aliyun/alibaba-cloud-sdk-go/services/sts",
"github.com/hashicorp/go-hclog",
"github.com/hashicorp/go-multierror",
"github.com/hashicorp/go-uuid",
"github.com/hashicorp/vault/helper/pluginutil",
"github.com/hashicorp/vault/logical",
"github.com/hashicorp/vault/logical/framework",
"github.com/hashicorp/vault/logical/plugin",
]
solver-name = "gps-cdcl"
solver-version = 1

Some files were not shown because too many files have changed in this diff Show More