custompolicy

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgencyCustomPolicy

type AgencyCustomPolicy struct {
	Version   string                        `json:"Version" required:"true"`
	Statement []AgencyCustomPolicyStatement `json:"Statement" required:"true"`
}

type AgencyCustomPolicyStatement

type AgencyCustomPolicyStatement struct {
	Effect   string                              `json:"Effect" required:"true"`
	Action   []string                            `json:"Action" required:"true"`
	Resource AgencyCustomPolicyStatementResource `json:"Resource" required:"true"`
}

type AgencyCustomPolicyStatementResource

type AgencyCustomPolicyStatementResource struct {
	Uri []string `json:"uri"`
}

type CloudServiceCustomPolicy

type CloudServiceCustomPolicy struct {
	Version   string                              `json:"Version" required:"true"`
	Statement []CloudServiceCustomPolicyStatement `json:"Statement" required:"true"`
}

type CloudServiceCustomPolicyStatement

type CloudServiceCustomPolicyStatement struct {
	Effect    string      `json:"Effect" required:"true"`
	Action    []string    `json:"Action" required:"true"`
	Condition interface{} `json:"Condition,omitempty"`
	Resource  []string    `json:"Resource,omitempty"`
}

type CreateAgencyCustomPolicyOpts

type CreateAgencyCustomPolicyOpts struct {
	DisplayName   string             `json:"display_name" required:"true"`
	Type          string             `json:"type" required:"true"`
	Description   string             `json:"description" required:"true"`
	DescriptionCn string             `json:"description_cn,omitempty"`
	Policy        AgencyCustomPolicy `json:"policy" required:"true"`
}

func (CreateAgencyCustomPolicyOpts) ToAgencyCustomPolicyCreateMap

func (opts CreateAgencyCustomPolicyOpts) ToAgencyCustomPolicyCreateMap() (map[string]interface{}, error)

type CreateAgencyCustomPolicyOptsBuilder

type CreateAgencyCustomPolicyOptsBuilder interface {
	ToAgencyCustomPolicyCreateMap() (map[string]interface{}, error)
}

type CreateCloudServiceCustomPolicyOpts

type CreateCloudServiceCustomPolicyOpts struct {
	DisplayName   string                   `json:"display_name" required:"true"`
	Type          string                   `json:"type" required:"true"`
	Description   string                   `json:"description" required:"true"`
	DescriptionCn string                   `json:"description_cn,omitempty"`
	Policy        CloudServiceCustomPolicy `json:"policy" required:"true"`
}

func (CreateCloudServiceCustomPolicyOpts) ToCloudServiceCustomPolicyCreateMap

func (opts CreateCloudServiceCustomPolicyOpts) ToCloudServiceCustomPolicyCreateMap() (map[string]interface{}, error)

type CreateCloudServiceCustomPolicyOptsBuilder

type CreateCloudServiceCustomPolicyOptsBuilder interface {
	ToCloudServiceCustomPolicyCreateMap() (map[string]interface{}, error)
}

type CreateCustomPolicyResponse

type CreateCustomPolicyResponse struct {
	Role struct {
		DomainID      string `json:"domain_id"`
		UpdatedTime   string `json:"updated_time"`
		CreatedTime   string `json:"created_time"`
		DescriptionCn string `json:"description_cn"`
		Catalog       string `json:"catalog"`
		Name          string `json:"name"`
		Description   string `json:"description"`
		References    int    `json:"references"`
		Links         struct {
			Self string `json:"self"`
		} `json:"links"`
		ID          string `json:"id"`
		DisplayName string `json:"display_name"`
		Type        string `json:"type"`
		Policy      struct {
			Version   string `json:"Version"`
			Statement []struct {
				Action   []string    `json:"Action"`
				Resource interface{} `json:"Resource"`
				Effect   string      `json:"Effect"`
			} `json:"Statement"`
		} `json:"policy"`
	} `json:"role"`
}

type CustomPolicyResponse

type CustomPolicyResponse struct {
	Role struct {
		DomainID      string `json:"domain_id"`
		UpdatedTime   string `json:"updated_time"`
		CreatedTime   string `json:"created_time"`
		DescriptionCn string `json:"description_cn"`
		Catalog       string `json:"catalog"`
		Name          string `json:"name"`
		Description   string `json:"description"`
		References    int    `json:"references"`
		Links         struct {
			Self string `json:"self"`
		} `json:"links"`
		ID          string `json:"id"`
		DisplayName string `json:"display_name"`
		Type        string `json:"type"`
		Policy      struct {
			Version   string `json:"Version"`
			Statement []struct {
				Condition interface{} `json:"Condition"`
				Action    []string    `json:"Action"`
				Resource  interface{} `json:"Resource"`
				Effect    string      `json:"Effect"`
			} `json:"Statement"`
		} `json:"policy"`
	} `json:"role"`
}

type CustomPolicyResult

type CustomPolicyResult struct {
	gophercloud.Result
}

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

func DeleteCustomPolicy

func DeleteCustomPolicy(client *gophercloud.ServiceClient, roleId string) (r DeleteResult)

type ListResponse

type ListResponse struct {
	Roles []struct {
		DomainID      string `json:"domain_id"`
		UpdatedTime   string `json:"updated_time"`
		CreatedTime   string `json:"created_time"`
		DescriptionCn string `json:"description_cn"`
		Catalog       string `json:"catalog"`
		Name          string `json:"name"`
		Description   string `json:"description"`
		References    int    `json:"references"`
		Links         struct {
			Self string `json:"self"`
		} `json:"links"`
		ID          string `json:"id"`
		DisplayName string `json:"display_name"`
		Type        string `json:"type"`
		Policy      struct {
			Version   string `json:"Version"`
			Statement []struct {
				Condition interface{} `json:"Condition"`
				Action    []string    `json:"Action"`
				Resource  interface{} `json:"Resource"`
				Effect    string      `json:"Effect"`
			} `json:"Statement"`
		} `json:"policy"`
	} `json:"roles"`
	Links struct {
		Next     interface{} `json:"next"`
		Previous interface{} `json:"previous"`
		Self     string      `json:"self"`
	} `json:"links"`
}

type ListResult

type ListResult struct {
	CustomPolicyResult
}

func ListCustomPolicies

func ListCustomPolicies(client *gophercloud.ServiceClient) (r ListResult)

func (ListResult) ExtractList

func (r ListResult) ExtractList() (*ListResponse, error)

type QueryResult

type QueryResult struct {
	CustomPolicyResult
}

func QueryCustomPolicyDetails

func QueryCustomPolicyDetails(client *gophercloud.ServiceClient, roleId string) (r QueryResult)

func UpdateAgencyCustomPolicy

func UpdateAgencyCustomPolicy(client *gophercloud.ServiceClient, roleId string, opts UpdateAgencyCustomPolicyOptsBuilder) (r QueryResult)

func UpdateCloudServiceCustomPolicy

func UpdateCloudServiceCustomPolicy(client *gophercloud.ServiceClient, roleId string, opts UpdateCloudServiceCustomPolicyOpts) (r QueryResult)

func (QueryResult) ExtractAgencyCustomCreate

func (r QueryResult) ExtractAgencyCustomCreate() (*CreateCustomPolicyResponse, error)

func (QueryResult) ExtractCreate

func (r QueryResult) ExtractCreate() (*CustomPolicyResponse, error)

func (QueryResult) ExtractPatch

func (r QueryResult) ExtractPatch() (*CustomPolicyResponse, error)

func (QueryResult) ExtractQuery

func (r QueryResult) ExtractQuery() (*CustomPolicyResponse, error)

type UpdateAgencyCustomPolicyOpts

type UpdateAgencyCustomPolicyOpts struct {
	DisplayName   string             `json:"display_name" required:"true"`
	Type          string             `json:"type" required:"true"`
	Description   string             `json:"description" required:"true"`
	DescriptionCn string             `json:"description_cn,omitempty"`
	Policy        AgencyCustomPolicy `json:"policy" required:"true"`
}

func (UpdateAgencyCustomPolicyOpts) ToAgencyCustomPolicyUpdateMap

func (opts UpdateAgencyCustomPolicyOpts) ToAgencyCustomPolicyUpdateMap() (map[string]interface{}, error)

type UpdateAgencyCustomPolicyOptsBuilder

type UpdateAgencyCustomPolicyOptsBuilder interface {
	ToAgencyCustomPolicyUpdateMap() (map[string]interface{}, error)
}

type UpdateCloudServiceCustomPolicyOpts

type UpdateCloudServiceCustomPolicyOpts struct {
	DisplayName   string                   `json:"display_name" required:"true"`
	Type          string                   `json:"type" required:"true"`
	Description   string                   `json:"description" required:"true"`
	DescriptionCn string                   `json:"description_cn,omitempty"`
	Policy        CloudServiceCustomPolicy `json:"policy" required:"true"`
}

func (UpdateCloudServiceCustomPolicyOpts) ToCloudServiceCustomPolicyUpdateMap

func (opts UpdateCloudServiceCustomPolicyOpts) ToCloudServiceCustomPolicyUpdateMap() (map[string]interface{}, error)

Jump to

Keyboard shortcuts

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