Documentation
¶
Index ¶
- type ApiService
- func (c *ApiService) CreateSsoCertificate(params *CreateSsoCertificateParam) (interface{}, error)
- func (c *ApiService) CreateSsoIntegration(params *CreateSsoIntegrationParam) (interface{}, error)
- func (c *ApiService) CreateSsoTeammate(params *CreateSsoTeammateParam) (interface{}, error)
- func (c *ApiService) DeleteSsoCertificate(params *DeleteSsoCertificateParam) (interface{}, error)
- func (c *ApiService) DeleteSsoIntegration(params *DeleteSsoIntegrationParam) (interface{}, error)
- func (c *ApiService) GetSsoCertificate(params *GetSsoCertificateParam) (interface{}, error)
- func (c *ApiService) GetSsoIntegration(params *GetSsoIntegrationParam) (interface{}, error)
- func (c *ApiService) ListSsoIntegration(params *ListSsoIntegrationParam) (interface{}, error)
- func (c *ApiService) ListSsoIntegrationCertificate(params *ListSsoIntegrationCertificateParam) (interface{}, error)
- func (c *ApiService) UpdateSsoCertificate(params *UpdateSsoCertificateParam) (interface{}, error)
- func (c *ApiService) UpdateSsoIntegration(params *UpdateSsoIntegrationParam) (interface{}, error)
- func (c *ApiService) UpdateSsoTeammate(params *UpdateSsoTeammateParam) (interface{}, error)
- type CreateSsoCertificateParam
- type CreateSsoCertificateRequest
- type CreateSsoIntegrationParam
- type CreateSsoTeammateParam
- type DeleteSsoCertificateParam
- type DeleteSsoIntegrationParam
- type GetSsoCertificateParam
- type GetSsoIntegrationParam
- type ListSsoIntegrationCertificateParam
- type ListSsoIntegrationParam
- type PatchSsoTeammates200
- type PermissionType
- type PermissionType1
- type Persona
- type PostPatchIntegrationRequest
- type PostSsoTeammates201
- type PostSsoTeammatesRequest
- type SsoCertificateBody
- type SsoErrorResponseInner
- type SsoIntegration
- type SsoTeammatesBaseRequestProps
- type SsoTeammatesBaseRequestPropsSubuserAccessInner
- type SsoTeammatesBaseResponseProps
- type SsoTeammatesRestrictedSubuserResponseProps
- type SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner
- type UpdateSsoCertificateParam
- type UpdateSsoCertificateRequest
- type UpdateSsoIntegrationParam
- func (params *UpdateSsoIntegrationParam) SetId(Id string) *UpdateSsoIntegrationParam
- func (params *UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *UpdateSsoIntegrationParam
- func (params *UpdateSsoIntegrationParam) SetSi(Si bool) *UpdateSsoIntegrationParam
- type UpdateSsoTeammateParam
- type UserType
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 ¶
func (params *DeleteSsoIntegrationParam) SetId(Id string) *DeleteSsoIntegrationParam
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 (params *GetSsoIntegrationParam) SetId(Id string) *GetSsoIntegrationParam
func (*GetSsoIntegrationParam) SetSi ¶
func (params *GetSsoIntegrationParam) SetSi(Si bool) *GetSsoIntegrationParam
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 ¶
func (params *ListSsoIntegrationParam) SetSi(Si bool) *ListSsoIntegrationParam
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 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 (params *UpdateSsoIntegrationParam) SetId(Id string) *UpdateSsoIntegrationParam
func (*UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest ¶
func (params *UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *UpdateSsoIntegrationParam
func (*UpdateSsoIntegrationParam) SetSi ¶
func (params *UpdateSsoIntegrationParam) SetSi(Si bool) *UpdateSsoIntegrationParam
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 (params *UpdateSsoTeammateParam) SetBody(Body SsoTeammatesBaseRequestProps) *UpdateSsoTeammateParam
func (*UpdateSsoTeammateParam) SetUsername ¶
func (params *UpdateSsoTeammateParam) SetUsername(Username string) *UpdateSsoTeammateParam
Source Files
¶
- api_create_sso_certificate.go
- api_create_sso_integration.go
- api_create_sso_teammate.go
- api_delete_sso_certificate.go
- api_delete_sso_integration.go
- api_get_sso_certificate.go
- api_get_sso_integration.go
- api_list_sso_integration.go
- api_list_sso_integration_certificate.go
- api_service.go
- api_update_sso_certificate.go
- api_update_sso_integration.go
- api_update_sso_teammate.go
- model_create_sso_certificate_request.go
- model_patch_sso_teammates200.go
- model_permission_type.go
- model_permission_type1.go
- model_persona.go
- model_post_patch_integration_request.go
- model_post_sso_teammates201.go
- model_post_sso_teammates_request.go
- model_sso_certificate_body.go
- model_sso_error_response_inner.go
- model_sso_integration.go
- model_sso_teammates_base_request_props.go
- model_sso_teammates_base_request_props_subuser_access_inner.go
- model_sso_teammates_base_response_props.go
- model_sso_teammates_restricted_subuser_response_props.go
- model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go
- model_update_sso_certificate_request.go
- model_user_type.go