Documentation ¶
Index ¶
- type AccountsV1AuthTokenPromotion
- type AccountsV1CredentialAws
- type AccountsV1CredentialPublicKey
- type AccountsV1Safelist
- type AccountsV1SecondaryAuthToken
- type ApiService
- func (c *ApiService) CreateCredentialAws(params *CreateCredentialAwsParams) (*AccountsV1CredentialAws, error)
- func (c *ApiService) CreateCredentialPublicKey(params *CreateCredentialPublicKeyParams) (*AccountsV1CredentialPublicKey, error)
- func (c *ApiService) CreateSafelist(params *CreateSafelistParams) (*AccountsV1Safelist, error)
- func (c *ApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken, error)
- func (c *ApiService) DeleteCredentialAws(Sid string) error
- func (c *ApiService) DeleteCredentialPublicKey(Sid string) error
- func (c *ApiService) DeleteSafelist(params *DeleteSafelistParams) error
- func (c *ApiService) DeleteSecondaryAuthToken() error
- func (c *ApiService) FetchCredentialAws(Sid string) (*AccountsV1CredentialAws, error)
- func (c *ApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1CredentialPublicKey, error)
- func (c *ApiService) FetchSafelist(params *FetchSafelistParams) (*AccountsV1Safelist, error)
- func (c *ApiService) ListCredentialAws(params *ListCredentialAwsParams) ([]AccountsV1CredentialAws, error)
- func (c *ApiService) ListCredentialPublicKey(params *ListCredentialPublicKeyParams) ([]AccountsV1CredentialPublicKey, error)
- func (c *ApiService) PageCredentialAws(params *ListCredentialAwsParams, pageToken, pageNumber string) (*ListCredentialAwsResponse, error)
- func (c *ApiService) PageCredentialPublicKey(params *ListCredentialPublicKeyParams, pageToken, pageNumber string) (*ListCredentialPublicKeyResponse, error)
- func (c *ApiService) StreamCredentialAws(params *ListCredentialAwsParams) (chan AccountsV1CredentialAws, chan error)
- func (c *ApiService) StreamCredentialPublicKey(params *ListCredentialPublicKeyParams) (chan AccountsV1CredentialPublicKey, chan error)
- func (c *ApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion, error)
- func (c *ApiService) UpdateCredentialAws(Sid string, params *UpdateCredentialAwsParams) (*AccountsV1CredentialAws, error)
- func (c *ApiService) UpdateCredentialPublicKey(Sid string, params *UpdateCredentialPublicKeyParams) (*AccountsV1CredentialPublicKey, error)
- type CreateCredentialAwsParams
- func (params *CreateCredentialAwsParams) SetAccountSid(AccountSid string) *CreateCredentialAwsParams
- func (params *CreateCredentialAwsParams) SetCredentials(Credentials string) *CreateCredentialAwsParams
- func (params *CreateCredentialAwsParams) SetFriendlyName(FriendlyName string) *CreateCredentialAwsParams
- type CreateCredentialPublicKeyParams
- func (params *CreateCredentialPublicKeyParams) SetAccountSid(AccountSid string) *CreateCredentialPublicKeyParams
- func (params *CreateCredentialPublicKeyParams) SetFriendlyName(FriendlyName string) *CreateCredentialPublicKeyParams
- func (params *CreateCredentialPublicKeyParams) SetPublicKey(PublicKey string) *CreateCredentialPublicKeyParams
- type CreateSafelistParams
- type DeleteSafelistParams
- type FetchSafelistParams
- type ListCredentialAwsParams
- type ListCredentialAwsResponse
- type ListCredentialAwsResponseMeta
- type ListCredentialPublicKeyParams
- type ListCredentialPublicKeyResponse
- type UpdateCredentialAwsParams
- type UpdateCredentialPublicKeyParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsV1AuthTokenPromotion ¶
type AccountsV1AuthTokenPromotion struct { // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for. AccountSid *string `json:"account_sid,omitempty"` // The promoted Auth Token that must be used to authenticate future API requests. AuthToken *string `json:"auth_token,omitempty"` // The date and time in UTC when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The URI for this resource, relative to `https://accounts.twilio.com` Url *string `json:"url,omitempty"` }
AccountsV1AuthTokenPromotion struct for AccountsV1AuthTokenPromotion
type AccountsV1CredentialAws ¶
type AccountsV1CredentialAws struct { // The unique string that we created to identify the AWS resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AWS resource. AccountSid *string `json:"account_sid,omitempty"` // The string that you assigned to describe the resource. FriendlyName *string `json:"friendly_name,omitempty"` // The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The URI for this resource, relative to `https://accounts.twilio.com` Url *string `json:"url,omitempty"` }
AccountsV1CredentialAws struct for AccountsV1CredentialAws
type AccountsV1CredentialPublicKey ¶
type AccountsV1CredentialPublicKey struct { // The unique string that that we created to identify the PublicKey resource. Sid *string `json:"sid,omitempty"` // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Credential that the PublicKey resource belongs to. AccountSid *string `json:"account_sid,omitempty"` // The string that you assigned to describe the resource. FriendlyName *string `json:"friendly_name,omitempty"` // The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The URI for this resource, relative to `https://accounts.twilio.com` Url *string `json:"url,omitempty"` }
AccountsV1CredentialPublicKey struct for AccountsV1CredentialPublicKey
type AccountsV1Safelist ¶
type AccountsV1Safelist struct { // The unique string that we created to identify the SafeList resource. Sid *string `json:"sid,omitempty"` // The phone number in SafeList. PhoneNumber *string `json:"phone_number,omitempty"` }
AccountsV1Safelist struct for AccountsV1Safelist
type AccountsV1SecondaryAuthToken ¶
type AccountsV1SecondaryAuthToken struct { // The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for. AccountSid *string `json:"account_sid,omitempty"` // The date and time in UTC when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. DateCreated *time.Time `json:"date_created,omitempty"` // The date and time in UTC when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. DateUpdated *time.Time `json:"date_updated,omitempty"` // The generated secondary Auth Token that can be used to authenticate future API requests. SecondaryAuthToken *string `json:"secondary_auth_token,omitempty"` // The URI for this resource, relative to `https://accounts.twilio.com` Url *string `json:"url,omitempty"` }
AccountsV1SecondaryAuthToken struct for AccountsV1SecondaryAuthToken
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) CreateCredentialAws ¶
func (c *ApiService) CreateCredentialAws(params *CreateCredentialAwsParams) (*AccountsV1CredentialAws, error)
Create a new AWS Credential
func (*ApiService) CreateCredentialPublicKey ¶
func (c *ApiService) CreateCredentialPublicKey(params *CreateCredentialPublicKeyParams) (*AccountsV1CredentialPublicKey, error)
Create a new Public Key Credential
func (*ApiService) CreateSafelist ¶
func (c *ApiService) CreateSafelist(params *CreateSafelistParams) (*AccountsV1Safelist, error)
Add a new phone number to SafeList.
func (*ApiService) CreateSecondaryAuthToken ¶
func (c *ApiService) CreateSecondaryAuthToken() (*AccountsV1SecondaryAuthToken, error)
Create a new secondary Auth Token
func (*ApiService) DeleteCredentialAws ¶
func (c *ApiService) DeleteCredentialAws(Sid string) error
Delete a Credential from your account
func (*ApiService) DeleteCredentialPublicKey ¶
func (c *ApiService) DeleteCredentialPublicKey(Sid string) error
Delete a Credential from your account
func (*ApiService) DeleteSafelist ¶
func (c *ApiService) DeleteSafelist(params *DeleteSafelistParams) error
Remove a phone number from SafeList.
func (*ApiService) DeleteSecondaryAuthToken ¶
func (c *ApiService) DeleteSecondaryAuthToken() error
Delete the secondary Auth Token from your account
func (*ApiService) FetchCredentialAws ¶
func (c *ApiService) FetchCredentialAws(Sid string) (*AccountsV1CredentialAws, error)
Fetch the AWS credentials specified by the provided Credential Sid
func (*ApiService) FetchCredentialPublicKey ¶
func (c *ApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1CredentialPublicKey, error)
Fetch the public key specified by the provided Credential Sid
func (*ApiService) FetchSafelist ¶
func (c *ApiService) FetchSafelist(params *FetchSafelistParams) (*AccountsV1Safelist, error)
Check if a phone number exists in SafeList.
func (*ApiService) ListCredentialAws ¶
func (c *ApiService) ListCredentialAws(params *ListCredentialAwsParams) ([]AccountsV1CredentialAws, error)
Lists CredentialAws records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) ListCredentialPublicKey ¶
func (c *ApiService) ListCredentialPublicKey(params *ListCredentialPublicKeyParams) ([]AccountsV1CredentialPublicKey, error)
Lists CredentialPublicKey records from the API as a list. Unlike stream, this operation is eager and loads 'limit' records into memory before returning.
func (*ApiService) PageCredentialAws ¶
func (c *ApiService) PageCredentialAws(params *ListCredentialAwsParams, pageToken, pageNumber string) (*ListCredentialAwsResponse, error)
Retrieve a single page of CredentialAws records from the API. Request is executed immediately.
func (*ApiService) PageCredentialPublicKey ¶
func (c *ApiService) PageCredentialPublicKey(params *ListCredentialPublicKeyParams, pageToken, pageNumber string) (*ListCredentialPublicKeyResponse, error)
Retrieve a single page of CredentialPublicKey records from the API. Request is executed immediately.
func (*ApiService) StreamCredentialAws ¶
func (c *ApiService) StreamCredentialAws(params *ListCredentialAwsParams) (chan AccountsV1CredentialAws, chan error)
Streams CredentialAws records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) StreamCredentialPublicKey ¶
func (c *ApiService) StreamCredentialPublicKey(params *ListCredentialPublicKeyParams) (chan AccountsV1CredentialPublicKey, chan error)
Streams CredentialPublicKey records from the API as a channel stream. This operation lazily loads records as efficiently as possible until the limit is reached.
func (*ApiService) UpdateAuthTokenPromotion ¶
func (c *ApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenPromotion, error)
Promote the secondary Auth Token to primary. After promoting the new token, all requests to Twilio using your old primary Auth Token will result in an error.
func (*ApiService) UpdateCredentialAws ¶
func (c *ApiService) UpdateCredentialAws(Sid string, params *UpdateCredentialAwsParams) (*AccountsV1CredentialAws, error)
Modify the properties of a given Account
func (*ApiService) UpdateCredentialPublicKey ¶
func (c *ApiService) UpdateCredentialPublicKey(Sid string, params *UpdateCredentialPublicKeyParams) (*AccountsV1CredentialPublicKey, error)
Modify the properties of a given Account
type CreateCredentialAwsParams ¶
type CreateCredentialAwsParams struct { // A string that contains the AWS access credentials in the format `<AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` Credentials *string `json:"Credentials,omitempty"` // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` // The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request. AccountSid *string `json:"AccountSid,omitempty"` }
Optional parameters for the method 'CreateCredentialAws'
func (*CreateCredentialAwsParams) SetAccountSid ¶
func (params *CreateCredentialAwsParams) SetAccountSid(AccountSid string) *CreateCredentialAwsParams
func (*CreateCredentialAwsParams) SetCredentials ¶
func (params *CreateCredentialAwsParams) SetCredentials(Credentials string) *CreateCredentialAwsParams
func (*CreateCredentialAwsParams) SetFriendlyName ¶
func (params *CreateCredentialAwsParams) SetFriendlyName(FriendlyName string) *CreateCredentialAwsParams
type CreateCredentialPublicKeyParams ¶
type CreateCredentialPublicKeyParams struct { // A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----` PublicKey *string `json:"PublicKey,omitempty"` // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` // The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request AccountSid *string `json:"AccountSid,omitempty"` }
Optional parameters for the method 'CreateCredentialPublicKey'
func (*CreateCredentialPublicKeyParams) SetAccountSid ¶
func (params *CreateCredentialPublicKeyParams) SetAccountSid(AccountSid string) *CreateCredentialPublicKeyParams
func (*CreateCredentialPublicKeyParams) SetFriendlyName ¶
func (params *CreateCredentialPublicKeyParams) SetFriendlyName(FriendlyName string) *CreateCredentialPublicKeyParams
func (*CreateCredentialPublicKeyParams) SetPublicKey ¶
func (params *CreateCredentialPublicKeyParams) SetPublicKey(PublicKey string) *CreateCredentialPublicKeyParams
type CreateSafelistParams ¶
type CreateSafelistParams struct { // The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). PhoneNumber *string `json:"PhoneNumber,omitempty"` }
Optional parameters for the method 'CreateSafelist'
func (*CreateSafelistParams) SetPhoneNumber ¶
func (params *CreateSafelistParams) SetPhoneNumber(PhoneNumber string) *CreateSafelistParams
type DeleteSafelistParams ¶
type DeleteSafelistParams struct { // The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). PhoneNumber *string `json:"PhoneNumber,omitempty"` }
Optional parameters for the method 'DeleteSafelist'
func (*DeleteSafelistParams) SetPhoneNumber ¶
func (params *DeleteSafelistParams) SetPhoneNumber(PhoneNumber string) *DeleteSafelistParams
type FetchSafelistParams ¶
type FetchSafelistParams struct { // The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). PhoneNumber *string `json:"PhoneNumber,omitempty"` }
Optional parameters for the method 'FetchSafelist'
func (*FetchSafelistParams) SetPhoneNumber ¶
func (params *FetchSafelistParams) SetPhoneNumber(PhoneNumber string) *FetchSafelistParams
type ListCredentialAwsParams ¶
type ListCredentialAwsParams struct { // 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 'ListCredentialAws'
func (*ListCredentialAwsParams) SetLimit ¶
func (params *ListCredentialAwsParams) SetLimit(Limit int) *ListCredentialAwsParams
func (*ListCredentialAwsParams) SetPageSize ¶
func (params *ListCredentialAwsParams) SetPageSize(PageSize int) *ListCredentialAwsParams
type ListCredentialAwsResponse ¶
type ListCredentialAwsResponse struct { Credentials []AccountsV1CredentialAws `json:"credentials,omitempty"` Meta ListCredentialAwsResponseMeta `json:"meta,omitempty"` }
ListCredentialAwsResponse struct for ListCredentialAwsResponse
type ListCredentialAwsResponseMeta ¶
type ListCredentialAwsResponseMeta struct { FirstPageUrl string `json:"first_page_url,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"` Key string `json:"key,omitempty"` }
ListCredentialAwsResponseMeta struct for ListCredentialAwsResponseMeta
type ListCredentialPublicKeyParams ¶
type ListCredentialPublicKeyParams struct { // 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 'ListCredentialPublicKey'
func (*ListCredentialPublicKeyParams) SetLimit ¶
func (params *ListCredentialPublicKeyParams) SetLimit(Limit int) *ListCredentialPublicKeyParams
func (*ListCredentialPublicKeyParams) SetPageSize ¶
func (params *ListCredentialPublicKeyParams) SetPageSize(PageSize int) *ListCredentialPublicKeyParams
type ListCredentialPublicKeyResponse ¶
type ListCredentialPublicKeyResponse struct { Credentials []AccountsV1CredentialPublicKey `json:"credentials,omitempty"` Meta ListCredentialAwsResponseMeta `json:"meta,omitempty"` }
ListCredentialPublicKeyResponse struct for ListCredentialPublicKeyResponse
type UpdateCredentialAwsParams ¶
type UpdateCredentialAwsParams struct { // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` }
Optional parameters for the method 'UpdateCredentialAws'
func (*UpdateCredentialAwsParams) SetFriendlyName ¶
func (params *UpdateCredentialAwsParams) SetFriendlyName(FriendlyName string) *UpdateCredentialAwsParams
type UpdateCredentialPublicKeyParams ¶
type UpdateCredentialPublicKeyParams struct { // A descriptive string that you create to describe the resource. It can be up to 64 characters long. FriendlyName *string `json:"FriendlyName,omitempty"` }
Optional parameters for the method 'UpdateCredentialPublicKey'
func (*UpdateCredentialPublicKeyParams) SetFriendlyName ¶
func (params *UpdateCredentialPublicKeyParams) SetFriendlyName(FriendlyName string) *UpdateCredentialPublicKeyParams
Source Files ¶
- api_service.go
- auth_tokens_promote.go
- auth_tokens_secondary.go
- credentials_aws.go
- credentials_public_keys.go
- model_accounts_v1_auth_token_promotion.go
- model_accounts_v1_credential_aws.go
- model_accounts_v1_credential_public_key.go
- model_accounts_v1_safelist.go
- model_accounts_v1_secondary_auth_token.go
- model_list_credential_aws_response.go
- model_list_credential_aws_response_meta.go
- model_list_credential_public_key_response.go
- safe_list_numbers.go