key

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package key contains auto-generated files. DO NOT MODIFY

Package key contains auto-generated files. DO NOT MODIFY

Package key contains auto-generated files. DO NOT MODIFY

Package key contains auto-generated files. DO NOT MODIFY

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for managing a specific api key resource See https://www.twilio.com/docs/iam/keys/api-key-resource for more details

func New

func New(client *client.Client, properties ClientProperties) *Client

New creates a new instance of the key client

func (Client) Delete

func (c Client) Delete() error

Delete removes a key resource from the account See https://www.twilio.com/docs/iam/keys/api-key-resource#delete-a-key-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) DeleteWithContext

func (c Client) DeleteWithContext(context context.Context) error

DeleteWithContext removes a key resource from the account See https://www.twilio.com/docs/iam/keys/api-key-resource#delete-a-key-resource for more details

func (Client) Fetch

func (c Client) Fetch() (*FetchKeyResponse, error)

Fetch retrieves the api key resource. The secret is not returned for security reasons See https://www.twilio.com/docs/iam/keys/api-key-resource#fetch-a-key-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) FetchWithContext

func (c Client) FetchWithContext(context context.Context) (*FetchKeyResponse, error)

FetchWithContext retrieves the api key resource. The secret is not returned for security reasons See https://www.twilio.com/docs/iam/keys/api-key-resource#fetch-a-key-resource for more details

func (Client) Update

func (c Client) Update(input *UpdateKeyInput) (*UpdateKeyResponse, error)

Update modifies a key resource. The secret is not returned for security reasons See https://www.twilio.com/docs/iam/keys/api-key-resource#update-a-key-resource for more details Context is defaulted to Background. See https://golang.org/pkg/context/#Background for more information

func (Client) UpdateWithContext

func (c Client) UpdateWithContext(context context.Context, input *UpdateKeyInput) (*UpdateKeyResponse, error)

UpdateWithContext modifies a key resource. The secret is not returned for security reasons See https://www.twilio.com/docs/iam/keys/api-key-resource#update-a-key-resource for more details

type ClientProperties

type ClientProperties struct {
	AccountSid string
	Sid        string
}

ClientProperties are the properties required to manage the key resources

type FetchKeyResponse

type FetchKeyResponse struct {
	DateCreated  utils.RFC2822Time  `json:"date_created"`
	DateUpdated  *utils.RFC2822Time `json:"date_updated,omitempty"`
	FriendlyName string             `json:"friendly_name"`
	Sid          string             `json:"sid"`
}

FetchKeyResponse defines the response fields for retrieving a API Key

type UpdateKeyInput

type UpdateKeyInput struct {
	FriendlyName *string `form:"FriendlyName,omitempty"`
}

UpdateKeyInput defines input fields for updating a API Key

type UpdateKeyResponse

type UpdateKeyResponse struct {
	DateCreated  utils.RFC2822Time  `json:"date_created"`
	DateUpdated  *utils.RFC2822Time `json:"date_updated,omitempty"`
	FriendlyName string             `json:"friendly_name"`
	Sid          string             `json:"sid"`
}

UpdateKeyResponse defines the response fields for the updated API Key

Jump to

Keyboard shortcuts

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