iam

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	Cred      aliauth.Credential
	Region    string
	UserName  string
	Password  string
	RoleName  string
	AccountId string
	// contains filtered or unexported fields
}

func (*Driver) AddRole

func (d *Driver) AddRole() (schema.IAMResult, error)

func (*Driver) AddUser

func (d *Driver) AddUser() (schema.IAMResult, error)

func (*Driver) AttachPolicyToUser added in v0.3.1

func (d *Driver) AttachPolicyToUser(ctx context.Context, userName, policyName, policyType string) error

AttachPolicyToUser binds the named RAM policy to userName. policyType is `System` (built-in) or `Custom` (account-defined); empty defaults to System.

func (*Driver) CreateAccessKey added in v0.3.1

func (d *Driver) CreateAccessKey(ctx context.Context, userName string) (schema.IAMCredential, string, error)

CreateAccessKey provisions a fresh AccessKey pair for userName.

func (*Driver) DelRole

func (d *Driver) DelRole() (schema.IAMResult, error)

func (*Driver) DelUser

func (d *Driver) DelUser() (schema.IAMResult, error)

func (*Driver) DeleteAccessKey added in v0.3.1

func (d *Driver) DeleteAccessKey(ctx context.Context, userName, accessKeyID string) error

DeleteAccessKey revokes the AccessKey identified by accessKeyID for userName.

func (*Driver) DetachPolicyFromUser added in v0.3.1

func (d *Driver) DetachPolicyFromUser(ctx context.Context, userName, policyName, policyType string) error

DetachPolicyFromUser removes the named RAM policy from userName.

func (*Driver) ListAccessKeys added in v0.3.1

func (d *Driver) ListAccessKeys(ctx context.Context, userName string) ([]schema.IAMCredential, error)

ListAccessKeys returns the RAM AccessKey records belonging to userName. An empty userName is allowed and asks RAM to return the keys of the calling principal — useful when the caller already proves access via the AK in use.

func (*Driver) ListRoleBindings added in v0.3.1

func (d *Driver) ListRoleBindings(ctx context.Context, userName string) ([]schema.RoleBinding, error)

ListRoleBindings returns the policies attached to the supplied RAM user. Alibaba RAM does not expose an account-wide enumeration of policy attachments, so userName is required.

func (*Driver) ListUsers

func (d *Driver) ListUsers(ctx context.Context) ([]schema.User, error)

func (*Driver) SetClientOptions added in v0.2.3

func (d *Driver) SetClientOptions(opts ...api.Option)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL