Skip to content

Commit

Permalink
20210126 Updates for new services and datatypes
Browse files Browse the repository at this point in the history
  • Loading branch information
allmightyspiff committed Jan 26, 2021
1 parent 7c86d42 commit ac48505
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 6 deletions.
28 changes: 27 additions & 1 deletion datatypes/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -2237,6 +2237,32 @@ type Container_Network_Bandwidth_Version1_Usage struct {
RecordedDate *Time `json:"recordedDate,omitempty" xmlrpc:"recordedDate,omitempty"`
}

// The SoftLayer_Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader data type contains information for specific responses from the modify response header API.
type Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader struct {
Entity

// Specifies the delimiter to be used when indicating multiple values for a header. Valid delimiter is, a <space>, , (comma), ; (semicolon), ,<space> (comma and space), or ;<space> (semicolon and space).
Delimiter *string `json:"delimiter,omitempty" xmlrpc:"delimiter,omitempty"`

// The description of modify response header.
Description *string `json:"description,omitempty" xmlrpc:"description,omitempty"`

// A collection of key value pairs that specify the headers and associated values to be modified. The header name and header value must be separated by colon (:). Example: ['header1:value1','header2:Value2']
Headers []string `json:"headers,omitempty" xmlrpc:"headers,omitempty"`

// The uniqueId of the modify response header to which the existing behavior belongs.
ModResHeaderUniqueId *string `json:"modResHeaderUniqueId,omitempty" xmlrpc:"modResHeaderUniqueId,omitempty"`

// The path, relative to the domain that is accessed via modify response header.
Path *string `json:"path,omitempty" xmlrpc:"path,omitempty"`

// The type of the modify response header, could be append/modify/delete. Set this to append to add a given header value to a header name set in the headerList. Set this to delete to remove a given header value from a header name set in the headerList. Set this to overwrite to match on a specified header name and replace its existing header value with a new one you specify.
Type *string `json:"type,omitempty" xmlrpc:"type,omitempty"`

// The uniqueId of the mapping to which the existing behavior belongs.
UniqueId *string `json:"uniqueId,omitempty" xmlrpc:"uniqueId,omitempty"`
}

// The SoftLayer_Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth data type contains information for specific responses from the Token Authentication API.
type Container_Network_CdnMarketplace_Configuration_Behavior_TokenAuth struct {
Entity
Expand Down Expand Up @@ -3621,7 +3647,7 @@ type Container_Product_Order struct {
// Device Fingerprint Identifier - Optional.
DeviceFingerprintId *string `json:"deviceFingerprintId,omitempty" xmlrpc:"deviceFingerprintId,omitempty"`

// This is the configuration identifier for tracking orders on the HTML order forms.
// This has been deprecated. It is the identifier used to track configurations in legacy order forms.
DisplayLayerSessionId *string `json:"displayLayerSessionId,omitempty" xmlrpc:"displayLayerSessionId,omitempty"`

// no documentation yet
Expand Down
8 changes: 8 additions & 0 deletions datatypes/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,11 @@ type Network_CdnMarketplace_Configuration_Behavior_HotlinkProtection struct {
RefererValues *string `json:"refererValues,omitempty" xmlrpc:"refererValues,omitempty"`
}

// no documentation yet
type Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader struct {
Entity
}

// no documentation yet
type Network_CdnMarketplace_Configuration_Behavior_TokenAuth struct {
Entity
Expand Down Expand Up @@ -3901,6 +3906,9 @@ type Network_Storage struct {
// Determines whether dependent volume provision is completed on background.
IsDependentDuplicateProvisionCompleted *bool `json:"isDependentDuplicateProvisionCompleted,omitempty" xmlrpc:"isDependentDuplicateProvisionCompleted,omitempty"`

// no documentation yet
IsInDedicatedServiceResource *bool `json:"isInDedicatedServiceResource,omitempty" xmlrpc:"isInDedicatedServiceResource,omitempty"`

// Determines whether a volume is ready to order snapshot space, or, if snapshot space is already available, to assign a snapshot schedule, or to take a manual snapshot.
IsReadyForSnapshot *bool `json:"isReadyForSnapshot,omitempty" xmlrpc:"isReadyForSnapshot,omitempty"`

Expand Down
108 changes: 105 additions & 3 deletions services/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -2077,6 +2077,89 @@ func (r Network_CdnMarketplace_Configuration_Behavior_HotlinkProtection) UpdateH
return
}

// no documentation yet
type Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader struct {
Session *session.Session
Options sl.Options
}

// GetNetworkCdnMarketplaceConfigurationBehaviorModifyResponseHeaderService returns an instance of the Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader SoftLayer service
func GetNetworkCdnMarketplaceConfigurationBehaviorModifyResponseHeaderService(sess *session.Session) Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader {
return Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader{Session: sess}
}

func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) Id(id int) Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader {
r.Options.Id = &id
return r
}

func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) Mask(mask string) Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader {
if !strings.HasPrefix(mask, "mask[") && (strings.Contains(mask, "[") || strings.Contains(mask, ",")) {
mask = fmt.Sprintf("mask[%s]", mask)
}

r.Options.Mask = mask
return r
}

func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) Filter(filter string) Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader {
r.Options.Filter = filter
return r
}

func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) Limit(limit int) Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader {
r.Options.Limit = &limit
return r
}

func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) Offset(offset int) Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader {
r.Options.Offset = &offset
return r
}

// no documentation yet
func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) CreateModifyResponseHeader(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) (resp datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) {
params := []interface{}{
input,
}
err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "createModifyResponseHeader", params, &r.Options, &resp)
return
}

// no documentation yet
func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) DeleteModifyResponseHeader(uniqueId *string, modResHeaderUniqueId *string) (resp string, err error) {
params := []interface{}{
uniqueId,
modResHeaderUniqueId,
}
err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "deleteModifyResponseHeader", params, &r.Options, &resp)
return
}

// no documentation yet
func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) GetObject() (resp datatypes.Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) {
err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "getObject", nil, &r.Options, &resp)
return
}

// no documentation yet
func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) ListModifyResponseHeader(uniqueId *string) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) {
params := []interface{}{
uniqueId,
}
err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "listModifyResponseHeader", params, &r.Options, &resp)
return
}

// no documentation yet
func (r Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) UpdateModifyResponseHeader(input *datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader) (resp []datatypes.Container_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader, err error) {
params := []interface{}{
input,
}
err = r.Session.DoRequest("SoftLayer_Network_CdnMarketplace_Configuration_Behavior_ModifyResponseHeader", "updateModifyResponseHeader", params, &r.Options, &resp)
return
}

// no documentation yet
type Network_CdnMarketplace_Configuration_Behavior_TokenAuth struct {
Session *session.Session
Expand Down Expand Up @@ -4591,12 +4674,13 @@ func (r Network_Gateway_VersionUpgrade) GetObject() (resp datatypes.Network_Gate
return
}

// Used to get a list per package of prices ids for allowed vSRX OS-es for new orders
// Used to get a list per package of prices ids for allowed vSRX OS-es for new orders.
//
//
func (r Network_Gateway_VersionUpgrade) GetVsrxOrdersAllowedOS(accountId *int) (resp []datatypes.Product_Package_Item_Prices, err error) {
func (r Network_Gateway_VersionUpgrade) GetVsrxOrdersAllowedOS(accountId *int, validate *bool) (resp []datatypes.Product_Package_Item_Prices, err error) {
params := []interface{}{
accountId,
validate,
}
err = r.Session.DoRequest("SoftLayer_Network_Gateway_VersionUpgrade", "getVsrxOrdersAllowedOS", params, &r.Options, &resp)
return
Expand Down Expand Up @@ -8051,6 +8135,12 @@ func (r Network_Storage) GetIsDependentDuplicateProvisionCompleted() (resp bool,
return
}

// Retrieve
func (r Network_Storage) GetIsInDedicatedServiceResource() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIsInDedicatedServiceResource", nil, &r.Options, &resp)
return
}

// Retrieve Determines whether a volume is ready to order snapshot space, or, if snapshot space is already available, to assign a snapshot schedule, or to take a manual snapshot.
func (r Network_Storage) GetIsReadyForSnapshot() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Network_Storage", "getIsReadyForSnapshot", nil, &r.Options, &resp)
Expand Down Expand Up @@ -10198,6 +10288,12 @@ func (r Network_Storage_Backup_Evault) GetIsDependentDuplicateProvisionCompleted
return
}

// Retrieve
func (r Network_Storage_Backup_Evault) GetIsInDedicatedServiceResource() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIsInDedicatedServiceResource", nil, &r.Options, &resp)
return
}

// Retrieve Determines whether a volume is ready to order snapshot space, or, if snapshot space is already available, to assign a snapshot schedule, or to take a manual snapshot.
func (r Network_Storage_Backup_Evault) GetIsReadyForSnapshot() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Network_Storage_Backup_Evault", "getIsReadyForSnapshot", nil, &r.Options, &resp)
Expand Down Expand Up @@ -12416,6 +12512,12 @@ func (r Network_Storage_Iscsi) GetIsDependentDuplicateProvisionCompleted() (resp
return
}

// Retrieve
func (r Network_Storage_Iscsi) GetIsInDedicatedServiceResource() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIsInDedicatedServiceResource", nil, &r.Options, &resp)
return
}

// Retrieve Determines whether a volume is ready to order snapshot space, or, if snapshot space is already available, to assign a snapshot schedule, or to take a manual snapshot.
func (r Network_Storage_Iscsi) GetIsReadyForSnapshot() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Network_Storage_Iscsi", "getIsReadyForSnapshot", nil, &r.Options, &resp)
Expand Down Expand Up @@ -15053,7 +15155,7 @@ func (r Network_Tunnel_Module_Context) AddServiceSubnetToNetworkTunnel(subnetId
return
}

// A transaction will be created to apply the IPSec network tunnel's configuration to SoftLayer network devices. During this time, an IPSec network tunnel cannot be modified in anyway. Only one network tunnel configuration transaction can be created. If a transaction has been created or is running, a new transaction cannot be created until the previous transaction completes.
// An asynchronous task will be created to apply the IPSec network tunnel's configuration to network devices. During this time, an IPSec network tunnel cannot be modified in anyway. Only one network tunnel configuration task can be created at a time. If a task has already been created and has not completed, a new task cannot be created.
func (r Network_Tunnel_Module_Context) ApplyConfigurationsToDevice() (resp bool, err error) {
err = r.Session.DoRequest("SoftLayer_Network_Tunnel_Module_Context", "applyConfigurationsToDevice", nil, &r.Options, &resp)
return
Expand Down
8 changes: 6 additions & 2 deletions services/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ func (r User_Customer) CreateNotificationSubscriber(keyName *string, resourceTab
//
// vpnPassword If the vpnPassword is provided, then the user's vpnPassword will be set to the provided password.  When creating a vpn only user, the vpnPassword MUST be supplied.  If the vpnPassword is not provided, then the user will need to use the portal to edit their profile and set the vpnPassword.
//
// IBMid considerations When a SoftLayer account is linked to a Platform Services (PaaS, formerly Bluemix) account, AND the trait on the SoftLayer Account indicating IBMid authentication is set, then SoftLayer will delegate the creation of the user to PaaS. The Platform Services "invite user" API call is asynchronous, and so no user object can be returned from this API call. In this specific case, this API will throw a SoftLayer_Exception_User_Customer_DelegateIamIdInvitationToPaas exception, with text indicating that the call was at least accepted by Platform Services. The Platform Services API is the preferred API for creating users based on IBMid in a linked account pair. If you have automation using this API that depends on getting a synchronous response with a user object with an id, you should contact SoftLayer Support to have the "IBMid authentication" trait set to 0 on this account. In that case, a normal SoftLayer user will be created (no IBMid association set up) and the createObject call will return synchronously as before.
// IBMid considerations When a SoftLayer account is linked to a Platform Services (PaaS, formerly Bluemix) account, AND the trait on the SoftLayer Account indicating IBMid authentication is set, then SoftLayer will delegate the creation of an ACTIVE user to PaaS. This means that even though the request to create a new user in such an account may start at the IMS API, via this delegation we effectively turn it into a request that is driven by PaaS. In particular this means that any "invitation email" that comes to the user, will come from PaaS, not from IMS via IBMid.
//
// Users created in states other than ACTIVE (for example, a VPN_ONLY user) will be created directly in IMS without delegation (but note that no invitation is sent for a user created in any state other than ACTIVE).
func (r User_Customer) CreateObject(templateObject *datatypes.User_Customer, password *string, vpnPassword *string) (resp datatypes.User_Customer, err error) {
params := []interface{}{
templateObject,
Expand Down Expand Up @@ -2730,7 +2732,9 @@ func (r User_Customer_OpenIdConnect) CreateNotificationSubscriber(keyName *strin
//
// vpnPassword If the vpnPassword is provided, then the user's vpnPassword will be set to the provided password.  When creating a vpn only user, the vpnPassword MUST be supplied.  If the vpnPassword is not provided, then the user will need to use the portal to edit their profile and set the vpnPassword.
//
// IBMid considerations When a SoftLayer account is linked to a Platform Services (PaaS, formerly Bluemix) account, AND the trait on the SoftLayer Account indicating IBMid authentication is set, then SoftLayer will delegate the creation of the user to PaaS. The Platform Services "invite user" API call is asynchronous, and so no user object can be returned from this API call. In this specific case, this API will throw a SoftLayer_Exception_User_Customer_DelegateIamIdInvitationToPaas exception, with text indicating that the call was at least accepted by Platform Services. The Platform Services API is the preferred API for creating users based on IBMid in a linked account pair. If you have automation using this API that depends on getting a synchronous response with a user object with an id, you should contact SoftLayer Support to have the "IBMid authentication" trait set to 0 on this account. In that case, a normal SoftLayer user will be created (no IBMid association set up) and the createObject call will return synchronously as before.
// IBMid considerations When a SoftLayer account is linked to a Platform Services (PaaS, formerly Bluemix) account, AND the trait on the SoftLayer Account indicating IBMid authentication is set, then SoftLayer will delegate the creation of an ACTIVE user to PaaS. This means that even though the request to create a new user in such an account may start at the IMS API, via this delegation we effectively turn it into a request that is driven by PaaS. In particular this means that any "invitation email" that comes to the user, will come from PaaS, not from IMS via IBMid.
//
// Users created in states other than ACTIVE (for example, a VPN_ONLY user) will be created directly in IMS without delegation (but note that no invitation is sent for a user created in any state other than ACTIVE).
func (r User_Customer_OpenIdConnect) CreateObject(templateObject *datatypes.User_Customer_OpenIdConnect, password *string, vpnPassword *string) (resp datatypes.User_Customer_OpenIdConnect, err error) {
params := []interface{}{
templateObject,
Expand Down
9 changes: 9 additions & 0 deletions services/virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,15 @@ func (r Virtual_Guest) ExecuteRescueLayer() (resp bool, err error) {
return
}

// Find VSIs by hostname.
func (r Virtual_Guest) FindByHostname(hostname *string) (resp []datatypes.Virtual_Guest, err error) {
params := []interface{}{
hostname,
}
err = r.Session.DoRequest("SoftLayer_Virtual_Guest", "findByHostname", params, &r.Options, &resp)
return
}

// Find CCI by only its primary public or private IP address. IP addresses within secondary subnets tied to the CCI will not return the CCI. If no CCI is found, no errors are generated and no data is returned.
func (r Virtual_Guest) FindByIpAddress(ipAddress *string) (resp datatypes.Virtual_Guest, err error) {
params := []interface{}{
Expand Down

0 comments on commit ac48505

Please sign in to comment.