Documentation ¶
Index ¶
- type ApiService
- func (c *ApiService) CreateNewKey(params *CreateNewKeyParams) (*IamV1NewKey, error)
- func (c *ApiService) DeleteKey(Sid string) error
- func (c *ApiService) FetchKey(Sid string) (*IamV1Key, error)
- func (c *ApiService) ListGetKeys(params *ListGetKeysParams) ([]IamV1GetKeys, error)
- func (c *ApiService) PageGetKeys(params *ListGetKeysParams, pageToken, pageNumber string) (*ListGetKeysResponse, error)
- func (c *ApiService) StreamGetKeys(params *ListGetKeysParams) (chan IamV1GetKeys, chan error)
- func (c *ApiService) UpdateKey(Sid string, params *UpdateKeyParams) (*IamV1Key, error)
- type CreateNewKeyParams
- func (params *CreateNewKeyParams) SetAccountSid(AccountSid string) *CreateNewKeyParams
- func (params *CreateNewKeyParams) SetFriendlyName(FriendlyName string) *CreateNewKeyParams
- func (params *CreateNewKeyParams) SetKeyType(KeyType string) *CreateNewKeyParams
- func (params *CreateNewKeyParams) SetPolicy(Policy interface{}) *CreateNewKeyParams
- type IamV1GetKeys
- type IamV1Key
- type IamV1NewKey
- type ListGetKeysParams
- type ListGetKeysResponse
- type ListGetKeysResponseMeta
- type UpdateKeyParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService(requestHandler *twilio.RequestHandler) *ApiService
func NewApiServiceWithClient ¶
func NewApiServiceWithClient(client twilio.BaseClient) *ApiService
func (*ApiService) CreateNewKey ¶
func (c *ApiService) CreateNewKey(params *CreateNewKeyParams) (*IamV1NewKey, error)
Create a new Signing Key for the account making the request.
func (*ApiService) DeleteKey ¶
func (c *ApiService) DeleteKey(Sid string) error
Delete a specific Key.
func (*ApiService) FetchKey ¶
func (c *ApiService) FetchKey(Sid string) (*IamV1Key, error)
Fetch a specific Key.
func (*ApiService) ListGetKeys ¶
func (c *ApiService) ListGetKeys(params *ListGetKeysParams) ([]IamV1GetKeys, error)
Lists GetKeys records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) PageGetKeys ¶
func (c *ApiService) PageGetKeys(params *ListGetKeysParams, pageToken, pageNumber string) (*ListGetKeysResponse, error)
Retrieve a single page of GetKeys records from the API. Request is executed immediately.
func (*ApiService) StreamGetKeys ¶
func (c *ApiService) StreamGetKeys(params *ListGetKeysParams) (chan IamV1GetKeys, chan error)
Streams GetKeys records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) UpdateKey ¶
func (c *ApiService) UpdateKey(Sid string, params *UpdateKeyParams) (*IamV1Key, error)
Update a specific Key.
type CreateNewKeyParams ¶
type CreateNewKeyParams struct { // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. AccountSid *string `json:"AccountSid,omitempty"` // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` // KeyType *string `json:"KeyType,omitempty"` // The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). Policy *interface{} `json:"Policy,omitempty"` }
Optional parameters for the method 'CreateNewKey'
func (*CreateNewKeyParams) SetAccountSid ¶
func (params *CreateNewKeyParams) SetAccountSid(AccountSid string) *CreateNewKeyParams
func (*CreateNewKeyParams) SetFriendlyName ¶
func (params *CreateNewKeyParams) SetFriendlyName(FriendlyName string) *CreateNewKeyParams
func (*CreateNewKeyParams) SetKeyType ¶
func (params *CreateNewKeyParams) SetKeyType(KeyType string) *CreateNewKeyParams
func (*CreateNewKeyParams) SetPolicy ¶
func (params *CreateNewKeyParams) SetPolicy(Policy interface{}) *CreateNewKeyParams
type IamV1GetKeys ¶
type IamV1GetKeys struct { // The unique string that we created to identify the Key resource. Sid *string `json:"sid,omitempty"` // The string that you assigned to describe the resource. FriendlyName *string `json:"friendly_name,omitempty"` // The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *string `json:"date_created,omitempty"` // The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *string `json:"date_updated,omitempty"` }
IamV1GetKeys struct for IamV1GetKeys
type IamV1Key ¶
type IamV1Key struct { // The unique string that we created to identify the Key resource. Sid *string `json:"sid,omitempty"` // The string that you assigned to describe the resource. FriendlyName *string `json:"friendly_name,omitempty"` // The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *string `json:"date_created,omitempty"` // The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *string `json:"date_updated,omitempty"` // The \\`Policy\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). Policy *interface{} `json:"policy,omitempty"` }
IamV1Key struct for IamV1Key
type IamV1NewKey ¶
type IamV1NewKey struct { // The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API. Sid *string `json:"sid,omitempty"` // The string that you assigned to describe the resource. FriendlyName *string `json:"friendly_name,omitempty"` // The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *string `json:"date_created,omitempty"` // The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *string `json:"date_updated,omitempty"` // The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.** Secret *string `json:"secret,omitempty"` // Collection of allow assertions. Policy *interface{} `json:"policy,omitempty"` }
IamV1NewKey struct for IamV1NewKey
type ListGetKeysParams ¶
type ListGetKeysParams struct { // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. AccountSid *string `json:"AccountSid,omitempty"` // How many resources to return in each list page. The default is 50, and the maximum is 1000. PageSize *int `json:"PageSize,omitempty"` // Max number of records to return. Limit *int `json:"limit,omitempty"` }
Optional parameters for the method 'ListGetKeys'
func (*ListGetKeysParams) SetAccountSid ¶
func (params *ListGetKeysParams) SetAccountSid(AccountSid string) *ListGetKeysParams
func (*ListGetKeysParams) SetLimit ¶
func (params *ListGetKeysParams) SetLimit(Limit int) *ListGetKeysParams
func (*ListGetKeysParams) SetPageSize ¶
func (params *ListGetKeysParams) SetPageSize(PageSize int) *ListGetKeysParams
type ListGetKeysResponse ¶
type ListGetKeysResponse struct { Keys []IamV1GetKeys `json:"keys,omitempty"` Meta ListGetKeysResponseMeta `json:"meta,omitempty"` }
ListGetKeysResponse struct for ListGetKeysResponse
type ListGetKeysResponseMeta ¶
type ListGetKeysResponseMeta struct { FirstPageUrl string `json:"first_page_url,omitempty"` Key string `json:"key,omitempty"` NextPageUrl *string `json:"next_page_url,omitempty"` Page int `json:"page,omitempty"` PageSize int `json:"page_size,omitempty"` PreviousPageUrl *string `json:"previous_page_url,omitempty"` Url string `json:"url,omitempty"` }
ListGetKeysResponseMeta struct for ListGetKeysResponseMeta
type UpdateKeyParams ¶
type UpdateKeyParams struct { // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` // The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). Policy *interface{} `json:"Policy,omitempty"` }
Optional parameters for the method 'UpdateKey'
func (*UpdateKeyParams) SetFriendlyName ¶
func (params *UpdateKeyParams) SetFriendlyName(FriendlyName string) *UpdateKeyParams
func (*UpdateKeyParams) SetPolicy ¶
func (params *UpdateKeyParams) SetPolicy(Policy interface{}) *UpdateKeyParams