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 Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the Twilio SendGrid application user interface.

The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory.

The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the public_certificate and integration_id parameters.

The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate Teammates API.

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:05.857995Z[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
CreateSsoCertificate CreateSsoCertificate Post /v3/sso/certificates Create an SSO Certificate
CreateSsoIntegration CreateSsoIntegration Post /v3/sso/integrations Create an SSO Integration
CreateSsoTeammate CreateSsoTeammate Post /v3/sso/teammates Create an SSO Teammate.
DeleteSsoCertificate DeleteSsoCertificate Delete /v3/sso/certificates/{CertId} Delete an SSO Certificate
DeleteSsoIntegration DeleteSsoIntegration Delete /v3/sso/integrations/{Id} Delete an SSO Integration
GetSsoCertificate GetSsoCertificate Get /v3/sso/certificates/{CertId} Get an SSO Certificate
GetSsoIntegration GetSsoIntegration Get /v3/sso/integrations/{Id} Get an SSO Integration
ListSsoIntegration ListSsoIntegration Get /v3/sso/integrations Get All SSO Integrations
ListSsoIntegrationCertificate ListSsoIntegrationCertificate Get /v3/sso/integrations/{IntegrationId}/certificates Get All SSO Certificates by Integration
UpdateSsoCertificate UpdateSsoCertificate Patch /v3/sso/certificates/{CertId} Update SSO Certificate
UpdateSsoIntegration UpdateSsoIntegration Patch /v3/sso/integrations/{Id} Update an SSO Integration
UpdateSsoTeammate UpdateSsoTeammate Patch /v3/sso/teammates/{Username} Edit an SSO Teammate

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 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) CreateSsoCertificate

func (c *ApiService) CreateSsoCertificate(params *CreateSsoCertificateParam) (interface{}, error)

**This endpoint allows you to create an SSO certificate.**

func (*ApiService) CreateSsoIntegration

func (c *ApiService) CreateSsoIntegration(params *CreateSsoIntegrationParam) (interface{}, error)

**This endpoint allows you to create an SSO integration.**

func (*ApiService) CreateSsoTeammate

func (c *ApiService) CreateSsoTeammate(params *CreateSsoTeammateParam) (interface{}, error)

**This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property.

func (*ApiService) DeleteSsoCertificate

func (c *ApiService) DeleteSsoCertificate(params *DeleteSsoCertificateParam) (interface{}, error)

**This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint.

func (*ApiService) DeleteSsoIntegration

func (c *ApiService) DeleteSsoIntegration(params *DeleteSsoIntegrationParam) (interface{}, error)

**This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint.

func (*ApiService) GetSsoCertificate

func (c *ApiService) GetSsoCertificate(params *GetSsoCertificateParam) (interface{}, error)

**This endpoint allows you to retrieve an individual SSO certificate.**

func (*ApiService) GetSsoIntegration

func (c *ApiService) GetSsoIntegration(params *GetSsoIntegrationParam) (interface{}, error)

**This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint.

func (*ApiService) ListSsoIntegration

func (c *ApiService) ListSsoIntegration(params *ListSsoIntegrationParam) (interface{}, error)

**This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations.

func (*ApiService) ListSsoIntegrationCertificate

func (c *ApiService) ListSsoIntegrationCertificate(params *ListSsoIntegrationCertificateParam) (interface{}, error)

**This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint.

func (*ApiService) UpdateSsoCertificate

func (c *ApiService) UpdateSsoCertificate(params *UpdateSsoCertificateParam) (interface{}, error)

**This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint.

func (*ApiService) UpdateSsoIntegration

func (c *ApiService) UpdateSsoIntegration(params *UpdateSsoIntegrationParam) (interface{}, error)

**This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint.

func (*ApiService) UpdateSsoTeammate

func (c *ApiService) UpdateSsoTeammate(params *UpdateSsoTeammateParam) (interface{}, error)

**This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property.

type CreateSsoCertificateParam

type CreateSsoCertificateParam struct {
	//
	CreateSsoCertificateRequest *CreateSsoCertificateRequest `json:"CreateSsoCertificateRequest,omitempty"`
}

func (*CreateSsoCertificateParam) SetCreateSsoCertificateRequest

func (params *CreateSsoCertificateParam) SetCreateSsoCertificateRequest(CreateSsoCertificateRequest CreateSsoCertificateRequest) *CreateSsoCertificateParam

type CreateSsoCertificateRequest

type CreateSsoCertificateRequest struct {
	// This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes.
	PublicCertificate string `json:"public_certificate"`
	// Indicates if the certificate is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint.
	IntegrationId string `json:"integration_id"`
}

CreateSsoCertificateRequest

type CreateSsoIntegrationParam

type CreateSsoIntegrationParam struct {
	//
	PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"`
}

func (*CreateSsoIntegrationParam) SetPostPatchIntegrationRequest

func (params *CreateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *CreateSsoIntegrationParam

type CreateSsoTeammateParam

type CreateSsoTeammateParam struct {
	//
	PostSsoTeammatesRequest *PostSsoTeammatesRequest `json:"PostSsoTeammatesRequest,omitempty"`
}

func (*CreateSsoTeammateParam) SetPostSsoTeammatesRequest

func (params *CreateSsoTeammateParam) SetPostSsoTeammatesRequest(PostSsoTeammatesRequest PostSsoTeammatesRequest) *CreateSsoTeammateParam

type DeleteSsoCertificateParam

type DeleteSsoCertificateParam struct {
	//
	CertId *string `json:"cert_id"`
}

func (*DeleteSsoCertificateParam) SetCertId

func (params *DeleteSsoCertificateParam) SetCertId(CertId string) *DeleteSsoCertificateParam

type DeleteSsoIntegrationParam

type DeleteSsoIntegrationParam struct {
	//
	Id *string `json:"id"`
}

func (*DeleteSsoIntegrationParam) SetId

type GetSsoCertificateParam

type GetSsoCertificateParam struct {
	//
	CertId *string `json:"cert_id"`
}

func (*GetSsoCertificateParam) SetCertId

func (params *GetSsoCertificateParam) SetCertId(CertId string) *GetSsoCertificateParam

type GetSsoIntegrationParam

type GetSsoIntegrationParam struct {
	//
	Id *string `json:"id"`
	// If this parameter is set to `true`, the response will include the `completed_integration` field.
	Si *bool `json:"si,omitempty"`
}

func (*GetSsoIntegrationParam) SetId

func (*GetSsoIntegrationParam) SetSi

type ListSsoIntegrationCertificateParam

type ListSsoIntegrationCertificateParam struct {
	// An ID that matches a certificate to a specific IdP integration.
	IntegrationId *string `json:"integration_id"`
}

func (*ListSsoIntegrationCertificateParam) SetIntegrationId

func (params *ListSsoIntegrationCertificateParam) SetIntegrationId(IntegrationId string) *ListSsoIntegrationCertificateParam

type ListSsoIntegrationParam

type ListSsoIntegrationParam struct {
	// If this parameter is set to `true`, the response will include the `completed_integration` field.
	Si *bool `json:"si,omitempty"`
}

func (*ListSsoIntegrationParam) SetSi

type PatchSsoTeammates200

type PatchSsoTeammates200 struct {
	// The Teammate's street address.
	Address *string `json:"address,omitempty"`
	// The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address.
	Address2 *string `json:"address2,omitempty"`
	// The Teammate's city.
	City *string `json:"city,omitempty"`
	// The Teammate's company name.
	Company *string `json:"company,omitempty"`
	// The Teammate's country of residence.
	Country *string `json:"country,omitempty"`
	// The Teammate's username. This property is set to the Teammate's email address.
	Username *string `json:"username,omitempty"`
	// The Teammate's phone number.
	Phone *string `json:"phone,omitempty"`
	// The Teammate's state or province.
	State *string `json:"state,omitempty"`
	// A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions.
	UserType *UserType `json:"user_type,omitempty"`
	// A website associated with the Teammate.
	Website *string `json:"website,omitempty"`
	// The Teammate's zip code.
	Zip *string `json:"zip,omitempty"`
	// The Teammate's first name.
	FirstName *string `json:"first_name,omitempty"`
	// The Teammate's last name.
	LastName *string `json:"last_name,omitempty"`
	// Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created.
	Email *string `json:"email,omitempty"`
	// Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin.
	IsAdmin *bool `json:"is_admin,omitempty"`
	// Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password.
	IsSso *bool `json:"is_sso,omitempty"`
	// The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes.
	Scopes *[]string `json:"scopes,omitempty"`
	// When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of.
	HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"`
	// Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`.
	SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"`
}

PatchSsoTeammates200 Successful SSO Teammates PATCH response.

type PermissionType

type PermissionType string

PermissionType the model 'PermissionType'

const (
	PERMISSIONTYPE_ADMIN      PermissionType = "admin"
	PERMISSIONTYPE_RESTRICTED PermissionType = "restricted"
)

List of PermissionType

type PermissionType1

type PermissionType1 string

PermissionType1 the model 'PermissionType1'

const (
	PERMISSIONTYPE1_ADMIN      PermissionType1 = "admin"
	PERMISSIONTYPE1_RESTRICTED PermissionType1 = "restricted"
)

List of PermissionType1

type Persona

type Persona string

Persona the model 'Persona'

const (
	PERSONA_ACCOUNTANT Persona = "accountant"
	PERSONA_DEVELOPER  Persona = "developer"
	PERSONA_MARKETER   Persona = "marketer"
	PERSONA_OBSERVER   Persona = "observer"
)

List of Persona

type PostPatchIntegrationRequest

type PostPatchIntegrationRequest struct {
	// The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid)
	Name string `json:"name"`
	// Indicates if the integration is enabled.
	Enabled bool `json:"enabled"`
	// The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI.
	SigninUrl string `json:"signin_url"`
	// This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out.
	SignoutUrl string `json:"signout_url"`
	// An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI.
	EntityId string `json:"entity_id"`
	// Indicates if the integration is complete.
	CompletedIntegration *bool `json:"completed_integration,omitempty"`
}

PostPatchIntegrationRequest struct for PostPatchIntegrationRequest

type PostSsoTeammates201

type PostSsoTeammates201 struct {
	// The Teammate's first name.
	FirstName *string `json:"first_name,omitempty"`
	// The Teammate's last name.
	LastName *string `json:"last_name,omitempty"`
	// Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created.
	Email *string `json:"email,omitempty"`
	// Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin.
	IsAdmin *bool `json:"is_admin,omitempty"`
	// Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password.
	IsSso *bool `json:"is_sso,omitempty"`
	// The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes.
	Scopes *[]string `json:"scopes,omitempty"`
	// When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of.
	HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"`
	// Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`.
	SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"`
}

PostSsoTeammates201 Successful SSO Teammates POST Response.

type PostSsoTeammatesRequest

type PostSsoTeammatesRequest struct {
	// Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created.
	Email string `json:"email"`
	// Set this property to the Teammate's first name.
	FirstName string `json:"first_name"`
	// Set this property to the Teammate's last name.
	LastName string `json:"last_name"`
	// Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes.
	IsAdmin *bool `json:"is_admin,omitempty"`
	// A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona.
	Persona *Persona `json:"persona,omitempty"`
	// Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate.
	Scopes *[]string `json:"scopes,omitempty"`
	// Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access.
	HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"`
	// Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`.
	SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"`
}

PostSsoTeammatesRequest struct for PostSsoTeammatesRequest

type SsoCertificateBody

type SsoCertificateBody struct {
	// This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI.
	PublicCertificate *string `json:"public_certificate,omitempty"`
	// A unique ID assigned to the certificate by SendGrid.
	Id *float32 `json:"id,omitempty"`
	// A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid.
	NotBefore *float32 `json:"not_before,omitempty"`
	// A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid.
	NotAfter *float32 `json:"not_after,omitempty"`
	// An ID that matches a certificate to a specific IdP integration.
	IntergrationId *string `json:"intergration_id,omitempty"`
}

SsoCertificateBody struct for SsoCertificateBody

type SsoErrorResponseInner

type SsoErrorResponseInner struct {
	Message *string `json:"message,omitempty"`
	Field   *string `json:"field,omitempty"`
	ErrorId *string `json:"error_id,omitempty"`
}

SsoErrorResponseInner struct for SsoErrorResponseInner

type SsoIntegration

type SsoIntegration struct {
	// The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid)
	Name string `json:"name"`
	// Indicates if the integration is enabled.
	Enabled bool `json:"enabled"`
	// The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI.
	SigninUrl string `json:"signin_url"`
	// This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out.
	SignoutUrl string `json:"signout_url"`
	// An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI.
	EntityId string `json:"entity_id"`
	// Indicates if the integration is complete.
	CompletedIntegration *bool `json:"completed_integration,omitempty"`
	// A timestamp representing the last time the configuration was modified.
	LastUpdated float32 `json:"last_updated"`
	// A unique ID assigned to the configuration by SendGrid.
	Id *string `json:"id,omitempty"`
	// The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid.
	SingleSignonUrl *string `json:"single_signon_url,omitempty"`
	// The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid.
	AudienceUrl *string `json:"audience_url,omitempty"`
}

SsoIntegration struct for SsoIntegration

type SsoTeammatesBaseRequestProps

type SsoTeammatesBaseRequestProps struct {
	// Set this property to the Teammate's first name.
	FirstName string `json:"first_name"`
	// Set this property to the Teammate's last name.
	LastName string `json:"last_name"`
	// Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes.
	IsAdmin *bool `json:"is_admin,omitempty"`
	// A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona.
	Persona *Persona `json:"persona,omitempty"`
	// Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate.
	Scopes *[]string `json:"scopes,omitempty"`
	// Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access.
	HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"`
	// Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`.
	SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"`
}

SsoTeammatesBaseRequestProps struct for SsoTeammatesBaseRequestProps

type SsoTeammatesBaseRequestPropsSubuserAccessInner

type SsoTeammatesBaseRequestPropsSubuserAccessInner struct {
	// Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/).
	Id int32 `json:"id"`
	// Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property.
	PermissionType PermissionType `json:"permission_type"`
	// Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser.
	Scopes *[]string `json:"scopes,omitempty"`
}

SsoTeammatesBaseRequestPropsSubuserAccessInner An array of Subusers to which the Teammate should have access.

type SsoTeammatesBaseResponseProps

type SsoTeammatesBaseResponseProps struct {
	// The Teammate's first name.
	FirstName *string `json:"first_name,omitempty"`
	// The Teammate's last name.
	LastName *string `json:"last_name,omitempty"`
	// Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created.
	Email *string `json:"email,omitempty"`
	// Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin.
	IsAdmin *bool `json:"is_admin,omitempty"`
	// Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password.
	IsSso *bool `json:"is_sso,omitempty"`
	// The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes.
	Scopes *[]string `json:"scopes,omitempty"`
}

SsoTeammatesBaseResponseProps struct for SsoTeammatesBaseResponseProps

type SsoTeammatesRestrictedSubuserResponseProps

type SsoTeammatesRestrictedSubuserResponseProps struct {
	// When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of.
	HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"`
	// Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`.
	SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"`
}

SsoTeammatesRestrictedSubuserResponseProps struct for SsoTeammatesRestrictedSubuserResponseProps

type SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner

type SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner struct {
	// The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/).
	Id *int32 `json:"id,omitempty"`
	// The username of a Subuser to which the Teammate has access.
	Username *string `json:"username,omitempty"`
	// The email address of a Subuser to which the Teammate has access.
	Email *string `json:"email,omitempty"`
	// Indicates if the Subuser is active for the SendGrid account.
	Disabled *bool `json:"disabled,omitempty"`
	// The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property.
	PermissionType *PermissionType1 `json:"permission_type,omitempty"`
	// The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes.
	Scopes *[]string `json:"scopes,omitempty"`
}

SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner An array of Subusers to which the Teammate has access.

type UpdateSsoCertificateParam

type UpdateSsoCertificateParam struct {
	//
	CertId *string `json:"cert_id"`
	//
	UpdateSsoCertificateRequest *UpdateSsoCertificateRequest `json:"UpdateSsoCertificateRequest,omitempty"`
}

func (*UpdateSsoCertificateParam) SetCertId

func (params *UpdateSsoCertificateParam) SetCertId(CertId string) *UpdateSsoCertificateParam

func (*UpdateSsoCertificateParam) SetUpdateSsoCertificateRequest

func (params *UpdateSsoCertificateParam) SetUpdateSsoCertificateRequest(UpdateSsoCertificateRequest UpdateSsoCertificateRequest) *UpdateSsoCertificateParam

type UpdateSsoCertificateRequest

type UpdateSsoCertificateRequest struct {
	// This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes.
	PublicCertificate *string `json:"public_certificate,omitempty"`
	// Indicates whether or not the certificate is enabled.
	Enabled *bool `json:"enabled,omitempty"`
	// An ID that matches a certificate to a specific IdP integration.
	IntegrationId *string `json:"integration_id,omitempty"`
}

UpdateSsoCertificateRequest struct for UpdateSsoCertificateRequest

type UpdateSsoIntegrationParam

type UpdateSsoIntegrationParam struct {
	//
	Id *string `json:"id"`
	// If this parameter is set to `true`, the response will include the `completed_integration` field.
	Si *bool `json:"si,omitempty"`
	//
	PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"`
}

func (*UpdateSsoIntegrationParam) SetId

func (*UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest

func (params *UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *UpdateSsoIntegrationParam

func (*UpdateSsoIntegrationParam) SetSi

type UpdateSsoTeammateParam

type UpdateSsoTeammateParam struct {
	// Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP.
	Username *string `json:"username"`
	//
	Body *SsoTeammatesBaseRequestProps `json:"body,omitempty"`
}

func (*UpdateSsoTeammateParam) SetBody

func (*UpdateSsoTeammateParam) SetUsername

func (params *UpdateSsoTeammateParam) SetUsername(Username string) *UpdateSsoTeammateParam

type UserType

type UserType string

UserType the model 'UserType'

const (
	USERTYPE_ADMIN    UserType = "admin"
	USERTYPE_OWNER    UserType = "owner"
	USERTYPE_TEAMMATE UserType = "teammate"
)

List of UserType

Jump to

Keyboard shortcuts

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