loggroups

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	// Specifies the log group name.
	LogGroupName string `json:"log_group_name" required:"true"`

	// Specifies the log expiration time.
	TTL int `json:"ttl_in_days,omitempty"`
}

CreateOpts is a struct that contains all the parameters.

func (CreateOpts) ToLogGroupsCreateMap

func (ops CreateOpts) ToLogGroupsCreateMap() (map[string]interface{}, error)

ToLogGroupsCreateMap is used for type convert

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToLogGroupsCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder is used for creating log group parameters.

type CreateResponse

type CreateResponse struct {
	ID string `json:"log_group_id"`
}

Log group Create response

type CreateResult

type CreateResult struct {
	golangsdk.Result
}

CreateResult is a struct that contains all the return parameters of creation

func Create

func Create(client *golangsdk.ServiceClient, ops CreateOptsBuilder) (r CreateResult)

Create a log group with given parameters.

func (CreateResult) Extract

func (r CreateResult) Extract() (*CreateResponse, error)

Extract from CreateResult

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult is a struct which contains the result of deletion

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)

Delete a log group by id

type ListResults

type ListResults struct {
	golangsdk.Result
}

ListResults contains the body of getting list

func List

func List(client *golangsdk.ServiceClient) (r ListResults)

Get log group list

func (ListResults) Extract

func (r ListResults) Extract() (*LogGroups, error)

Extract list from GetResult

type LogGroup

type LogGroup struct {
	ID           string `json:"log_group_id"`
	Name         string `json:"log_group_name"`
	CreationTime int64  `json:"creation_time"`
	TTLinDays    int    `json:"ttl_in_days"`
}

Log group response

type LogGroups

type LogGroups struct {
	LogGroups []LogGroup `json:"log_groups"`
}

Log group list response

type UpdateOpts

type UpdateOpts struct {
	// Specifies the log expiration time.
	TTL int `json:"ttl_in_days,omitempty"`
}

UpdateOpts contain options for updating an existing Group. For more information about the parameters, see the LogGroup object.

func (UpdateOpts) ToLogGroupsUpdateMap

func (ops UpdateOpts) ToLogGroupsUpdateMap() (map[string]interface{}, error)

ToLogGroupsUpdateMap is used for type convert

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToLogGroupsUpdateMap() (map[string]interface{}, error)
}

UpdateOptsBuilder allows extensions to add additional parameters to the Update request.

type UpdateResult

type UpdateResult struct {
	golangsdk.Result
}

UpdateResult contains the response body and error from an Update request.

func Update

func Update(client *golangsdk.ServiceClient, ops UpdateOptsBuilder, id string) (r UpdateResult)

update a log group with given parameters by id.

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*LogGroup, error)

Extract from UpdateResult

Jump to

Keyboard shortcuts

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