openapi

package
v4.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 6 Imported by: 0

README

Go API client for

The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid IP Address API and IP Pools API. This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks.

Overview

This API client was generated by the OpenAPI Generator project from the OpenAPI specs located at twilio/sendgrid-oai. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version:
  • Build date: 2024-10-24T13:26:02.536771Z[Etc/UTC]
  • Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit https://support.sendgrid.com/hc/en-us

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import "./"

Documentation for API Endpoints

All URIs are relative to https://api.sendgrid.com

Class Method HTTP request Description
AddIp AddIp Post /v3/send_ips/ips Add a Twilio SendGrid IP Address
AddIpsToIpPool AddIpsToIpPool Post /v3/send_ips/pools/{Poolid}/ips:batchAdd Add a Batch of IPs to an IP Pool
AddSubUsersToIp AddSubUsersToIp Post /v3/send_ips/ips/{Ip}/subusers:batchAdd Assign a Batch of Subusers to an IP
CreateIpPool CreateIpPool Post /v3/send_ips/pools Create an IP Pool with a Name and IP Assignments
DeleteIpPool DeleteIpPool Delete /v3/send_ips/pools/{Poolid} Delete IP Pool
DeleteIpsFromIpPool DeleteIpsFromIpPool Post /v3/send_ips/pools/{Poolid}/ips:batchDelete Delete a Batch of IPs from an IP Pool
DeleteSubUsersFromIp DeleteSubUsersFromIp Post /v3/send_ips/ips/{Ip}/subusers:batchDelete Delete a Batch of Subusers from an IP
GetIp GetIp Get /v3/send_ips/ips/{Ip} Get Details for an IP Address
GetIpPool GetIpPool Get /v3/send_ips/pools/{Poolid} Get Details for an IP Pool
ListIp ListIp Get /v3/send_ips/ips Get a List of all IP Addresses on your Account
ListIpAssignedToIpPool ListIpAssignedToIpPool Get /v3/send_ips/pools/{Poolid}/ips Get IPs Assigned to an IP Pool
ListIpPool ListIpPool Get /v3/send_ips/pools GET all IP Pools that have Associated IPs
ListSubUserAssignedToIp ListSubUserAssignedToIp Get /v3/send_ips/ips/{Ip}/subusers Get a List of Subusers Assigned to an IP
UpdateIp UpdateIp Patch /v3/send_ips/ips/{Ip} Update Details for an IP Address
UpdateIpPool UpdateIpPool Put /v3/send_ips/pools/{Poolid} Update an IP Pool Name

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
    UserName: "username",
    Password: "password",
})
r, err := client.Service.Operation(auth, args)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddIp201Response

type AddIp201Response struct {
	// The IP address that was added to your account.
	Ip *string `json:"ip,omitempty"`
	// Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address).  This parameter is returned only if the IP address is set to automatically warm up.
	IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"`
	// Indicates if a parent on the account is able to send email from the IP address.
	IsParentAssigned *bool `json:"is_parent_assigned,omitempty"`
	// An array of Subuser IDs the IP address was assigned to.
	Subusers *[]string `json:"subusers,omitempty"`
	// The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request.
	Region *Region2 `json:"region,omitempty"`
}

AddIp201Response struct for AddIp201Response

type AddIpParam

type AddIpParam struct {
	//
	AddIpRequest *AddIpRequest `json:"AddIpRequest,omitempty"`
}

func (*AddIpParam) SetAddIpRequest

func (params *AddIpParam) SetAddIpRequest(AddIpRequest AddIpRequest) *AddIpParam

type AddIpRequest

type AddIpRequest struct {
	// Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address).
	IsAutoWarmup bool `json:"is_auto_warmup"`
	// Indicates if a parent on the account is able to send email from the IP address.
	IsParentAssigned bool `json:"is_parent_assigned"`
	// An array of Subuser IDs the IP address will be assigned to.
	Subusers *[]string `json:"subusers,omitempty"`
	// The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request.
	Region *Region3 `json:"region,omitempty"`
	// Boolean indicating whether or not to return the IP address's region information in the response.
	IncludeRegion *bool `json:"include_region,omitempty"`
}

AddIpRequest struct for AddIpRequest

type AddIpsToIpPool200Response

type AddIpsToIpPool200Response struct {
	// The name of the IP Pool.
	Name *string `json:"name,omitempty"`
	// The unique ID of the IP Pool.
	Id *string `json:"id,omitempty"`
	// An array of IP addresses assigned to the IP Pool.
	Ips *[]string `json:"ips,omitempty"`
}

AddIpsToIpPool200Response struct for AddIpsToIpPool200Response

type AddIpsToIpPoolParam

type AddIpsToIpPoolParam struct {
	// Specifies the unique ID for an IP Pool.
	Poolid *string `json:"poolid"`
	//
	AddIpsToIpPoolRequest *AddIpsToIpPoolRequest `json:"AddIpsToIpPoolRequest,omitempty"`
}

func (*AddIpsToIpPoolParam) SetAddIpsToIpPoolRequest

func (params *AddIpsToIpPoolParam) SetAddIpsToIpPoolRequest(AddIpsToIpPoolRequest AddIpsToIpPoolRequest) *AddIpsToIpPoolParam

func (*AddIpsToIpPoolParam) SetPoolid

func (params *AddIpsToIpPoolParam) SetPoolid(Poolid string) *AddIpsToIpPoolParam

type AddIpsToIpPoolRequest

type AddIpsToIpPoolRequest struct {
	// An array of IP addresses to assign to the specified IP Pool. All assignments must succeed.
	Ips []string `json:"ips"`
}

AddIpsToIpPoolRequest struct for AddIpsToIpPoolRequest

type AddSubUsersToIp200Response

type AddSubUsersToIp200Response struct {
	// The IP address the Subusers were assigned to.
	Ip *string `json:"ip,omitempty"`
	// An array of Subuser IDs that were assigned to the specified IP address.
	Subusers *[]string `json:"subusers,omitempty"`
}

AddSubUsersToIp200Response struct for AddSubUsersToIp200Response

type AddSubUsersToIpParam

type AddSubUsersToIpParam struct {
	// The `ip` path parameter specifies an IP address to make the request against.
	Ip *string `json:"ip"`
	//
	AddSubUsersToIpRequest *AddSubUsersToIpRequest `json:"AddSubUsersToIpRequest,omitempty"`
}

func (*AddSubUsersToIpParam) SetAddSubUsersToIpRequest

func (params *AddSubUsersToIpParam) SetAddSubUsersToIpRequest(AddSubUsersToIpRequest AddSubUsersToIpRequest) *AddSubUsersToIpParam

func (*AddSubUsersToIpParam) SetIp

type AddSubUsersToIpRequest

type AddSubUsersToIpRequest struct {
	// An array of Subuser IDs to be assigned to the specified IP address. All Subuser assignments must succeed.
	Subusers []string `json:"subusers"`
}

AddSubUsersToIpRequest struct for AddSubUsersToIpRequest

type ApiService

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

func NewApiService

func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService

func NewApiServiceWithClient

func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService

func (*ApiService) AddIp

func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error)

This operation adds a Twilio SendGrid IP address to your account. You can also assign up to 100 Subusers to the IP address at creation.

func (*ApiService) AddIpsToIpPool

func (c *ApiService) AddIpsToIpPool(params *AddIpsToIpPoolParam) (interface{}, error)

This operation appends a batch of IPs to an IP Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error.

func (*ApiService) AddSubUsersToIp

func (c *ApiService) AddSubUsersToIp(params *AddSubUsersToIpParam) (interface{}, error)

This operation appends a batch of Subusers to a specified IP address. This endpoint requires all Subuser assignments to succeed. If a Subuser assignment fails, this endpoint will return an error.

func (*ApiService) CreateIpPool

func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error)

This operation will create a named IP Pool and associate specified IP addresses with the newly created Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error and the Pool will not be created. Each IP Pool may have a maximum of 100 assigned IP addresses.

func (*ApiService) DeleteIpPool

func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error)

This operation deletes an IP Pool and unassigns all IP addresses associated with the Pool. IP addresses associated with the deleted Pool will remain in your account.

func (*ApiService) DeleteIpsFromIpPool

func (c *ApiService) DeleteIpsFromIpPool(params *DeleteIpsFromIpPoolParam) (interface{}, error)

This operation removes a batch of IPs from an IP Pool. All IPs associated with the Pool will be unassigned from the deleted Pool. However, this operation does not remove the IPs from your account.

func (*ApiService) DeleteSubUsersFromIp

func (c *ApiService) DeleteSubUsersFromIp(params *DeleteSubUsersFromIpParam) (interface{}, error)

This operation removes a batch of Subusers from a specified IP address.

func (*ApiService) GetIp

func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error)

This operation returns details for a specified IP address. Details include whether the IP is assigned to a parent account, set to warm up automatically, which Pools the IP is associated with, when the IP was added and modified, whether the IP is leased, and whether the IP is enabled. Note that this operation will not return Subuser information associated with the IP. To retrieve Subuser information, use the \"Get a List of Subusers Assigned to an IP\" endpoint.

func (*ApiService) GetIpPool

func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error)

This operation will return the details for a specified IP Pool, including the Pool's name, ID, a sample list of the IPs associated with the Pool, and the total number of IPs belonging to the Pool. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation.

func (*ApiService) ListIp

func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error)

This operation returns a list of all IP addresses associated with your account. A sample of IP details is returned with each IP, including which Pools the IP is associated with, whether the IP is set to warm up automatically, and when the IP was last updated. ### Limitations The `is_parent_assigned` parameter and `pool` parameter cannot be used at the same time. By definition, an IP cannot be assigned to a Pool if it is not first enabled. You can use either the `before_key` or `after_key` in combination with the `limit` parameter to iterate through paginated results but not both.

func (*ApiService) ListIpAssignedToIpPool

func (c *ApiService) ListIpAssignedToIpPool(params *ListIpAssignedToIpPoolParam) (interface{}, error)

This operation returns the IP addresses that are assigned to the specified IP pool.

func (*ApiService) ListIpPool

func (c *ApiService) ListIpPool(params *ListIpPoolParam) (interface{}, error)

This operation returns a list of your IP Pools and a sample of each Pools' associated IP addresses. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. Each user may have a maximum of 100 IP Pools.

func (*ApiService) ListSubUserAssignedToIp

func (c *ApiService) ListSubUserAssignedToIp(params *ListSubUserAssignedToIpParam) (interface{}, error)

This operation returns a list of Subuser IDs that have been assigned the specified IP address. To retrieve more information about the returned Subusers, use the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/list-all-subusers). You can use the `after_key` and `limit` query parameters to iterate through paginated results. The maximum limit is 100, meaning you may retrieve up to 100 Subusers per request. If the `after_key` in the API response is not null, there are more Subusers assigned to the IP address than those returned in the request. You can repeat the request with the non-null `after_key` value and the same limit to retrieve the next group of Subusers.

func (*ApiService) UpdateIp

func (c *ApiService) UpdateIp(params *UpdateIpParam) (interface{}, error)

This operation updates an IP address's settings, including whether the IP is set to warm up automatically, if the IP is assigned by a parent account, and whether the IP is enabled or disabled. The request body must include at least one of the `is_auto_warmup`, `is_parent_assigned`, or `is_enabled` fields.

func (*ApiService) UpdateIpPool

func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error)

This operation will rename an IP Pool. An IP Pool name cannot start with a dot/period (.) or space.

type CreateIpPool201Response

type CreateIpPool201Response struct {
	// The name assigned to the IP Pool.
	Name *string `json:"name,omitempty"`
	// The unique ID of the IP Pool.
	Id *string `json:"id,omitempty"`
	// An array of IP addresses assigned to the IP Pool. All assignments must succeed.
	Ips *[]string `json:"ips,omitempty"`
}

CreateIpPool201Response struct for CreateIpPool201Response

type CreateIpPoolParam

type CreateIpPoolParam struct {
	//
	CreateIpPoolRequest *CreateIpPoolRequest `json:"CreateIpPoolRequest,omitempty"`
}

func (*CreateIpPoolParam) SetCreateIpPoolRequest

func (params *CreateIpPoolParam) SetCreateIpPoolRequest(CreateIpPoolRequest CreateIpPoolRequest) *CreateIpPoolParam

type CreateIpPoolRequest

type CreateIpPoolRequest struct {
	// The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period.
	Name string `json:"name"`
	// An array of IP addresses to assign to the IP Pool. All assignments must succeed.
	Ips *[]string `json:"ips,omitempty"`
}

CreateIpPoolRequest struct for CreateIpPoolRequest

type DeleteIpPoolParam

type DeleteIpPoolParam struct {
	// Specifies the unique ID for an IP Pool.
	Poolid *string `json:"poolid"`
}

func (*DeleteIpPoolParam) SetPoolid

func (params *DeleteIpPoolParam) SetPoolid(Poolid string) *DeleteIpPoolParam

type DeleteIpsFromIpPoolParam

type DeleteIpsFromIpPoolParam struct {
	// Specifies the unique ID for an IP Pool.
	Poolid *string `json:"poolid"`
	//
	DeleteIpsFromIpPoolRequest *DeleteIpsFromIpPoolRequest `json:"DeleteIpsFromIpPoolRequest,omitempty"`
}

func (*DeleteIpsFromIpPoolParam) SetDeleteIpsFromIpPoolRequest

func (params *DeleteIpsFromIpPoolParam) SetDeleteIpsFromIpPoolRequest(DeleteIpsFromIpPoolRequest DeleteIpsFromIpPoolRequest) *DeleteIpsFromIpPoolParam

func (*DeleteIpsFromIpPoolParam) SetPoolid

func (params *DeleteIpsFromIpPoolParam) SetPoolid(Poolid string) *DeleteIpsFromIpPoolParam

type DeleteIpsFromIpPoolRequest

type DeleteIpsFromIpPoolRequest struct {
	// An array of IP addresses to remove from the specified IP Pool.
	Ips []string `json:"ips"`
}

DeleteIpsFromIpPoolRequest struct for DeleteIpsFromIpPoolRequest

type DeleteSubUsersFromIpParam

type DeleteSubUsersFromIpParam struct {
	// The `ip` path parameter specifies an IP address to make the request against.
	Ip *string `json:"ip"`
	//
	DeleteSubUsersFromIpRequest *DeleteSubUsersFromIpRequest `json:"DeleteSubUsersFromIpRequest,omitempty"`
}

func (*DeleteSubUsersFromIpParam) SetDeleteSubUsersFromIpRequest

func (params *DeleteSubUsersFromIpParam) SetDeleteSubUsersFromIpRequest(DeleteSubUsersFromIpRequest DeleteSubUsersFromIpRequest) *DeleteSubUsersFromIpParam

func (*DeleteSubUsersFromIpParam) SetIp

type DeleteSubUsersFromIpRequest

type DeleteSubUsersFromIpRequest struct {
	// An array of Subuser IDs to be removed from the specified IP address.
	Subusers []string `json:"subusers"`
}

DeleteSubUsersFromIpRequest struct for DeleteSubUsersFromIpRequest

type GetIp200Response

type GetIp200Response struct {
	// The IP address specified in the request.
	Ip *string `json:"ip,omitempty"`
	// Indicates if a parent on the account is able to send email from the IP address.
	IsParentAssigned *bool `json:"is_parent_assigned,omitempty"`
	// Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address).
	IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"`
	// An array of IP Pools the IP address is assigned to.
	Pools *[]GetIp200ResponsePoolsInner `json:"pools,omitempty"`
	// A timestamp indicating when the IP address was added to your account.
	AddedAt *int32 `json:"added_at,omitempty"`
	// A timestamp indicating when the IP was last updated.
	UpdatedAt *int32 `json:"updated_at,omitempty"`
	// Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses.
	IsEnabled *bool `json:"is_enabled,omitempty"`
	// Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account.
	IsLeased *bool `json:"is_leased,omitempty"`
	// The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. Possible values are `us` or `eu`.
	Region *string `json:"region,omitempty"`
}

GetIp200Response struct for GetIp200Response

type GetIp200ResponsePoolsInner

type GetIp200ResponsePoolsInner struct {
	// The ID of the IP Pool.
	Id *string `json:"id,omitempty"`
	// The name of the IP Pool.
	Name *string `json:"name,omitempty"`
}

GetIp200ResponsePoolsInner struct for GetIp200ResponsePoolsInner

type GetIpParam

type GetIpParam struct {
	// Boolean indicating whether or not to return the IP Pool's region information in the response.
	IncludeRegion *bool `json:"include_region,omitempty"`
}

func (*GetIpParam) SetIncludeRegion

func (params *GetIpParam) SetIncludeRegion(IncludeRegion bool) *GetIpParam

type GetIpPool200Response

type GetIpPool200Response struct {
	// The name of the IP Pool.
	Name *string `json:"name,omitempty"`
	// The unique ID of the IP Pool.
	Id *string `json:"id,omitempty"`
	// A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results.
	IpsPreview *[]string `json:"ips_preview,omitempty"`
	// The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses.
	TotalIpCount *int32 `json:"total_ip_count,omitempty"`
	// The total number of IP addresses by region. this object is only returned if the `include_region` parameter is included and set to `true` in the API request.
	IpCountByRegion *[]GetIpPool200ResponseIpCountByRegionInner `json:"ip_count_by_region,omitempty"`
}

GetIpPool200Response struct for GetIpPool200Response

type GetIpPool200ResponseIpCountByRegionInner

type GetIpPool200ResponseIpCountByRegionInner struct {
	// The region associated with the number of IPs listed in the `count` property.
	Region *Region5 `json:"region,omitempty"`
	// The number of IP addresses in the pool that are assigned to the region specified in the `region` property for this count.
	Count *int32 `json:"count,omitempty"`
}

GetIpPool200ResponseIpCountByRegionInner struct for GetIpPool200ResponseIpCountByRegionInner

type GetIpPoolParam

type GetIpPoolParam struct {
	// Boolean indicating whether or not to return the IP Pool's region information in the response.
	IncludeRegion *bool `json:"include_region,omitempty"`
}

func (*GetIpPoolParam) SetIncludeRegion

func (params *GetIpPoolParam) SetIncludeRegion(IncludeRegion bool) *GetIpPoolParam

type IpAddressManagementErrorResponse

type IpAddressManagementErrorResponse struct {
	// An array of error objects.
	Errors *[]IpAddressManagementErrorResponseErrorsInner `json:"errors,omitempty"`
}

IpAddressManagementErrorResponse IP Address Management Error Response Schema

type IpAddressManagementErrorResponseErrorsInner

type IpAddressManagementErrorResponseErrorsInner struct {
	// Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error.
	Field *string `json:"field,omitempty"`
	// An error-specific message that provides more information about the error's cause.
	Message *string `json:"message,omitempty"`
}

IpAddressManagementErrorResponseErrorsInner struct for IpAddressManagementErrorResponseErrorsInner

type Items

type Items string

Items the model 'Items'

const (
	ITEMS_EU Items = "eu"
	ITEMS_US Items = "us"
)

List of Items

type ListIp200Response

type ListIp200Response struct {
	Result   *[]ListIp200ResponseResultInner `json:"result,omitempty"`
	Metadata *ListIp200ResponseMetadata      `json:"_metadata,omitempty"`
}

ListIp200Response struct for ListIp200Response

type ListIp200ResponseMetadata

type ListIp200ResponseMetadata struct {
	NextParams *ListIp200ResponseMetadataNextParams `json:"next_params,omitempty"`
}

ListIp200ResponseMetadata struct for ListIp200ResponseMetadata

type ListIp200ResponseMetadataNextParams

type ListIp200ResponseMetadataNextParams struct {
	// Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter.
	AfterKey *string `json:"after_key,omitempty"`
	// Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `before_key` cannot be used in combination with the `after_key` parameter.
	BeforeKey *string `json:"before_key,omitempty"`
	// The IP address specified in the request with the `ip` query parameter. This parameter is returned only when an IP is included in the request.
	Ip *string `json:"ip,omitempty"`
	// Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. This parameter is returned only if the IP address is leased.
	IsLeased *bool `json:"is_leased,omitempty"`
	// Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. This parameter is returned only if the IP address is enabled.
	IsEnabled *bool `json:"is_enabled,omitempty"`
	// Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned.
	IsParentAssigned *bool `json:"is_parent_assigned,omitempty"`
	// The IP Pool ID specified in the request with the `pool` query parameter. This parameter is returned only when an IP Pool is included in the request.
	Pool *string `json:"pool,omitempty"`
	// The beginning of the time window specified in the request with the `start_added_at` query parameter. This parameter is returned only when the `start_added_at` parameter is included in the request.
	StartAddedAt *string `json:"start_added_at,omitempty"`
	// The end of the time window specified in the request with the `end_added_at` query parameter. This parameter is returned only when the `end_added_at` parameter is included in the request.
	EndAddedAt *string `json:"end_added_at,omitempty"`
	// The number of items returned in the request. This parameter is returned only when a `limit` is set using the `limit` query parameter in the request.
	Limit *string `json:"limit,omitempty"`
	// The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request,
	Region *Region1 `json:"region,omitempty"`
	// Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request.
	IncludeRegion *string `json:"include_region,omitempty"`
}

ListIp200ResponseMetadataNextParams struct for ListIp200ResponseMetadataNextParams

type ListIp200ResponseResultInner

type ListIp200ResponseResultInner struct {
	// An IP address on your account.
	Ip *string `json:"ip,omitempty"`
	// An array of IP Pools the IP address is assigned to.
	Pools *[]ListIp200ResponseResultInnerPoolsInner `json:"pools,omitempty"`
	// Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address).
	IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"`
	// Indicates if a parent on the account is able to send email from the IP address. This parameter will be returned only if the request was made by the parent account.
	IsParentAssigned *bool `json:"is_parent_assigned,omitempty"`
	// A timestamp indicating when the IP was last updated.
	UpdatedAt *int32 `json:"updated_at,omitempty"`
	// Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses.
	IsEnabled *bool `json:"is_enabled,omitempty"`
	// Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account.
	IsLeased *bool `json:"is_leased,omitempty"`
	// A timestamp representing when the IP address was added to your account.
	AddedAt *int32 `json:"added_at,omitempty"`
	// The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request.
	Region *Region `json:"region,omitempty"`
}

ListIp200ResponseResultInner struct for ListIp200ResponseResultInner

type ListIp200ResponseResultInnerPoolsInner

type ListIp200ResponseResultInnerPoolsInner struct {
	// The name of the IP Pool.
	Name *string `json:"name,omitempty"`
	// The unique ID of the IP Pool.
	Id *string `json:"id,omitempty"`
}

ListIp200ResponseResultInnerPoolsInner struct for ListIp200ResponseResultInnerPoolsInner

type ListIpAssignedToIpPool200Response

type ListIpAssignedToIpPool200Response struct {
	Result   *[]ListIpAssignedToIpPool200ResponseResultInner `json:"result,omitempty"`
	Metadata *ListIpAssignedToIpPool200ResponseMetadata      `json:"_metadata,omitempty"`
}

ListIpAssignedToIpPool200Response struct for ListIpAssignedToIpPool200Response

type ListIpAssignedToIpPool200ResponseMetadata

type ListIpAssignedToIpPool200ResponseMetadata struct {
	NextParams *ListIpAssignedToIpPool200ResponseMetadataNextParams `json:"next_params,omitempty"`
}

ListIpAssignedToIpPool200ResponseMetadata struct for ListIpAssignedToIpPool200ResponseMetadata

type ListIpAssignedToIpPool200ResponseMetadataNextParams

type ListIpAssignedToIpPool200ResponseMetadataNextParams struct {
	// Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter.
	AfterKey *string `json:"after_key,omitempty"`
	// The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API.
	Limit *string `json:"limit,omitempty"`
	// Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request.
	IncludeRegion *string `json:"include_region,omitempty"`
}

ListIpAssignedToIpPool200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint.

type ListIpAssignedToIpPool200ResponseResultInner

type ListIpAssignedToIpPool200ResponseResultInner struct {
	// An IP address assigned to the IP Pool.
	Ip *string `json:"ip,omitempty"`
	// The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request.
	Region *Region6 `json:"region,omitempty"`
	// IP Pools the IP address is assigned to.
	Pools *[]ListIp200ResponseResultInnerPoolsInner `json:"pools,omitempty"`
}

ListIpAssignedToIpPool200ResponseResultInner struct for ListIpAssignedToIpPool200ResponseResultInner

type ListIpAssignedToIpPoolParam

type ListIpAssignedToIpPoolParam struct {
	// Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results.
	Limit *int32 `json:"limit,omitempty"`
	// Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results.
	AfterKey *int32 `json:"after_key,omitempty"`
	// Boolean indicating whether or not to return the IP Pool's region information in the response.
	IncludeRegion *bool `json:"include_region,omitempty"`
}

func (*ListIpAssignedToIpPoolParam) SetAfterKey

func (params *ListIpAssignedToIpPoolParam) SetAfterKey(AfterKey int32) *ListIpAssignedToIpPoolParam

func (*ListIpAssignedToIpPoolParam) SetIncludeRegion

func (params *ListIpAssignedToIpPoolParam) SetIncludeRegion(IncludeRegion bool) *ListIpAssignedToIpPoolParam

func (*ListIpAssignedToIpPoolParam) SetLimit

type ListIpParam

type ListIpParam struct {
	// Specifies an IP address. The `ip` query parameter can be used to filter results by IP address.
	Ip *string `json:"ip,omitempty"`
	// Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results.
	Limit *int32 `json:"limit,omitempty"`
	// Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results.
	AfterKey *int32 `json:"after_key,omitempty"`
	// Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results.
	BeforeKey *string `json:"before_key,omitempty"`
	// Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account.
	IsLeased *bool `json:"is_leased,omitempty"`
	// Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses.
	IsEnabled *bool `json:"is_enabled,omitempty"`
	// A parent must be assigned to an IP address before the parent can send mail from the IP and before the address can be assigned to an IP pool. Set this parameter value to true to allow the parent to send mail from the IP and make the IP eligible for IP pool assignment using the IP pool endpoints.
	IsParentAssigned *bool `json:"is_parent_assigned,omitempty"`
	// Specifies the unique ID for an IP Pool. When included, only IP addresses belonging to the specified Pool will be returned.
	Pool *string `json:"pool,omitempty"`
	// The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `start_added_at` parameter sets the beginning of the time window.
	StartAddedAt *int32 `json:"start_added_at,omitempty"`
	// The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `end_added_at` parameter sets the end of the time window.
	EndAddedAt *int32 `json:"end_added_at,omitempty"`
	// Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones.
	Region *Region7 `json:"region,omitempty"`
	// Boolean indicating whether or not to return the IP Pool's region information in the response.
	IncludeRegion *bool `json:"include_region,omitempty"`
}

func (*ListIpParam) SetAfterKey

func (params *ListIpParam) SetAfterKey(AfterKey int32) *ListIpParam

func (*ListIpParam) SetBeforeKey

func (params *ListIpParam) SetBeforeKey(BeforeKey string) *ListIpParam

func (*ListIpParam) SetEndAddedAt

func (params *ListIpParam) SetEndAddedAt(EndAddedAt int32) *ListIpParam

func (*ListIpParam) SetIncludeRegion

func (params *ListIpParam) SetIncludeRegion(IncludeRegion bool) *ListIpParam

func (*ListIpParam) SetIp

func (params *ListIpParam) SetIp(Ip string) *ListIpParam

func (*ListIpParam) SetIsEnabled

func (params *ListIpParam) SetIsEnabled(IsEnabled bool) *ListIpParam

func (*ListIpParam) SetIsLeased

func (params *ListIpParam) SetIsLeased(IsLeased bool) *ListIpParam

func (*ListIpParam) SetIsParentAssigned

func (params *ListIpParam) SetIsParentAssigned(IsParentAssigned bool) *ListIpParam

func (*ListIpParam) SetLimit

func (params *ListIpParam) SetLimit(Limit int32) *ListIpParam

func (*ListIpParam) SetPool

func (params *ListIpParam) SetPool(Pool string) *ListIpParam

func (*ListIpParam) SetRegion

func (params *ListIpParam) SetRegion(Region Region7) *ListIpParam

func (*ListIpParam) SetStartAddedAt

func (params *ListIpParam) SetStartAddedAt(StartAddedAt int32) *ListIpParam

type ListIpPool200Response

type ListIpPool200Response struct {
	Result   *[]ListIpPool200ResponseResultInner `json:"result,omitempty"`
	Metadata *ListIpPool200ResponseMetadata      `json:"_metadata,omitempty"`
}

ListIpPool200Response struct for ListIpPool200Response

type ListIpPool200ResponseMetadata

type ListIpPool200ResponseMetadata struct {
	NextParams *ListIpPool200ResponseMetadataNextParams `json:"next_params,omitempty"`
}

ListIpPool200ResponseMetadata struct for ListIpPool200ResponseMetadata

type ListIpPool200ResponseMetadataNextParams

type ListIpPool200ResponseMetadataNextParams struct {
	// Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter.
	AfterKey *string `json:"after_key,omitempty"`
	// The IP address specified in the request. This parameter will be returned only if it was specified in the request.
	Ip *string `json:"ip,omitempty"`
	// The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API.
	Limit *string `json:"limit,omitempty"`
	// The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request.
	Region *Region4 `json:"region,omitempty"`
	// Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request.
	IncludeRegion *string `json:"include_region,omitempty"`
}

ListIpPool200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint.

type ListIpPool200ResponseResultInner

type ListIpPool200ResponseResultInner struct {
	// The name of the IP Pool.
	Name *string `json:"name,omitempty"`
	// The unique ID of the IP Pool.
	Id *string `json:"id,omitempty"`
	// An array of the unique regions of all the IP addresses returned within the IP pool.
	Regions *[]Items `json:"regions,omitempty"`
	// A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results.
	IpsPreview *[]string `json:"ips_preview,omitempty"`
	// The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses.
	TotalIpCount *int32 `json:"total_ip_count,omitempty"`
}

ListIpPool200ResponseResultInner struct for ListIpPool200ResponseResultInner

type ListIpPoolParam

type ListIpPoolParam struct {
	// Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results.
	Limit *int32 `json:"limit,omitempty"`
	// Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results.
	AfterKey *int32 `json:"after_key,omitempty"`
	// Specifies an IP address. The `ip` query parameter can be used to filter results by IP address.
	Ip *string `json:"ip,omitempty"`
	// Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones.
	Region *Region7 `json:"region,omitempty"`
	// Boolean indicating whether or not to return the IP Pool's region information in the response.
	IncludeRegion *bool `json:"include_region,omitempty"`
}

func (*ListIpPoolParam) SetAfterKey

func (params *ListIpPoolParam) SetAfterKey(AfterKey int32) *ListIpPoolParam

func (*ListIpPoolParam) SetIncludeRegion

func (params *ListIpPoolParam) SetIncludeRegion(IncludeRegion bool) *ListIpPoolParam

func (*ListIpPoolParam) SetIp

func (params *ListIpPoolParam) SetIp(Ip string) *ListIpPoolParam

func (*ListIpPoolParam) SetLimit

func (params *ListIpPoolParam) SetLimit(Limit int32) *ListIpPoolParam

func (*ListIpPoolParam) SetRegion

func (params *ListIpPoolParam) SetRegion(Region Region7) *ListIpPoolParam

type ListSubUserAssignedToIp200Response

type ListSubUserAssignedToIp200Response struct {
	// An array of Subuser IDs that have been assigned the specified IP address.
	Result   *[]string                                   `json:"result,omitempty"`
	Metadata *ListSubUserAssignedToIp200ResponseMetadata `json:"_metadata,omitempty"`
}

ListSubUserAssignedToIp200Response struct for ListSubUserAssignedToIp200Response

type ListSubUserAssignedToIp200ResponseMetadata

type ListSubUserAssignedToIp200ResponseMetadata struct {
	NextParams *ListSubUserAssignedToIp200ResponseMetadataNextParams `json:"next_params,omitempty"`
}

ListSubUserAssignedToIp200ResponseMetadata struct for ListSubUserAssignedToIp200ResponseMetadata

type ListSubUserAssignedToIp200ResponseMetadataNextParams

type ListSubUserAssignedToIp200ResponseMetadataNextParams struct {
	// Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter.
	AfterKey *string `json:"after_key,omitempty"`
	// The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API.
	Limit *string `json:"limit,omitempty"`
}

ListSubUserAssignedToIp200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint.

type ListSubUserAssignedToIpParam

type ListSubUserAssignedToIpParam struct {
	// Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results.
	AfterKey *int32 `json:"after_key,omitempty"`
	// Specifies the number of results to be returned by the API. This parameter can be used in combination with the `after_key` parameters to iterate through paginated results. The maximum limit is 100.
	Limit *int32 `json:"limit,omitempty"`
}

func (*ListSubUserAssignedToIpParam) SetAfterKey

func (params *ListSubUserAssignedToIpParam) SetAfterKey(AfterKey int32) *ListSubUserAssignedToIpParam

func (*ListSubUserAssignedToIpParam) SetLimit

type Region

type Region string

Region the model 'Region'

const (
	REGION_EU Region = "eu"
	REGION_US Region = "us"
)

List of Region

type Region1

type Region1 string

Region1 the model 'Region1'

const (
	REGION1_ALL Region1 = "all"
	REGION1_US  Region1 = "us"
	REGION1_EU  Region1 = "eu"
)

List of Region1

type Region2

type Region2 string

Region2 the model 'Region2'

const (
	REGION2_EU Region2 = "eu"
	REGION2_US Region2 = "us"
)

List of Region2

type Region3

type Region3 string

Region3 the model 'Region3'

const (
	REGION3_EU Region3 = "eu"
	REGION3_US Region3 = "us"
)

List of Region3

type Region4

type Region4 string

Region4 the model 'Region4'

const (
	REGION4_ALL Region4 = "all"
	REGION4_US  Region4 = "us"
	REGION4_EU  Region4 = "eu"
)

List of Region4

type Region5

type Region5 string

Region5 the model 'Region5'

const (
	REGION5_US Region5 = "us"
	REGION5_EU Region5 = "eu"
)

List of Region5

type Region6

type Region6 string

Region6 the model 'Region6'

const (
	REGION6_EU Region6 = "eu"
	REGION6_US Region6 = "us"
)

List of Region6

type Region7

type Region7 string

Region7 the model 'Region7'

const (
	REGION7_ALL Region7 = "all"
	REGION7_EU  Region7 = "eu"
	REGION7_US  Region7 = "us"
)

List of Region7

type UpdateIp200Response

type UpdateIp200Response struct {
	// The IP address that was updated.
	Ip *string `json:"ip,omitempty"`
	// Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address).
	IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"`
	// Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned.
	IsParentAssigned *bool `json:"is_parent_assigned,omitempty"`
	// An array of Subuser IDs the IP address was assigned to. This parameter is returned only if the IP address is enabled.
	IsEnabled *bool `json:"is_enabled,omitempty"`
}

UpdateIp200Response struct for UpdateIp200Response

type UpdateIpParam

type UpdateIpParam struct {
	// The `ip` path parameter specifies an IP address to make the request against.
	Ip *string `json:"ip"`
	//
	UpdateIpRequest *UpdateIpRequest `json:"UpdateIpRequest,omitempty"`
}

func (*UpdateIpParam) SetIp

func (params *UpdateIpParam) SetIp(Ip string) *UpdateIpParam

func (*UpdateIpParam) SetUpdateIpRequest

func (params *UpdateIpParam) SetUpdateIpRequest(UpdateIpRequest UpdateIpRequest) *UpdateIpParam

type UpdateIpPool200Response

type UpdateIpPool200Response struct {
	// The name assigned to the IP Pool.
	Name *string `json:"name,omitempty"`
	// The unique ID of the IP Pool.
	Id *string `json:"id,omitempty"`
}

UpdateIpPool200Response struct for UpdateIpPool200Response

type UpdateIpPoolParam

type UpdateIpPoolParam struct {
	// Specifies the unique ID for an IP Pool.
	Poolid *string `json:"poolid"`
	//
	UpdateIpPoolRequest *UpdateIpPoolRequest `json:"UpdateIpPoolRequest,omitempty"`
}

func (*UpdateIpPoolParam) SetPoolid

func (params *UpdateIpPoolParam) SetPoolid(Poolid string) *UpdateIpPoolParam

func (*UpdateIpPoolParam) SetUpdateIpPoolRequest

func (params *UpdateIpPoolParam) SetUpdateIpPoolRequest(UpdateIpPoolRequest UpdateIpPoolRequest) *UpdateIpPoolParam

type UpdateIpPoolRequest

type UpdateIpPoolRequest struct {
	// The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period.
	Name string `json:"name"`
}

UpdateIpPoolRequest struct for UpdateIpPoolRequest

type UpdateIpRequest

type UpdateIpRequest struct {
	// Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address).
	IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"`
	// Indicates if a parent on the account is able to send email from the IP address.
	IsParentAssigned *bool `json:"is_parent_assigned,omitempty"`
	// Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses.
	IsEnabled *bool `json:"is_enabled,omitempty"`
}

UpdateIpRequest struct for UpdateIpRequest

Source Files

Jump to

Keyboard shortcuts

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