SoftLayer API Hardware : Fast Provision of BM Server PresetConfiguration OS - api

Using the Fast Provision of BM Server REST API :
http://sldn.softlayer.com/blog/bpotter/ordering-bare-metal-servers-using-softlayer-api
SoftLayer_Hardware/getCreateObjectOptions : In the response we will get fixed preset configuration,datacenter,operating system details,etc.,
When I provision using OS Reference code ESXI_5.1_64, I am getting the below mentioned error. In the request I have not mentioned networkComponents details and if i add "networkComponents": [{ "maxSpeed": 100 }], details then also i am getting the below mentioned error message.
{
"error": "VMware ESXi 5.5 cannot be ordered with 100 Mbps Public & Private Network Uplinks"
"code": "SoftLayer_Exception_Public"
}
Also if i use some of the operating system reference codes i am getting the below mentioned error.
{
"error": "Unable to match an OS with reference code: XENSERVER_6.0_64"
"code": "SoftLayer_Exception_NotFound"
}
"operatingSystemReferenceCode": "XENSERVER_6.0_64" "operatingSystemReferenceCode": "REDHAT_6_64"

1. The exception:
{ "error": "VMware ESXi 5.5 cannot be ordered with 100 Mbps Public &
Private Network Uplinks" "code": "SoftLayer_Exception_Public" }
Reason: The VMware OSes cannot be ordered with "100 Mbps Public & Private Network Uplinks" (e.g. "networkComponents": [{ "maxSpeed": 100 }]). VMware OSes must be ordered at least with "1 Gbps Public & Private Network Uplinks". (e.g. "networkComponents": [{ "maxSpeed": 1000}]).
2. The exception:
{ "error": "Unable to match an OS with reference code:
XENSERVER_6.0_64" "code": "SoftLayer_Exception_NotFound" }
Probably you are trying to order a hourly server ("hourlyBillingFlag": true), this can be the reason of the exception, because this OS is only available for Monthly billing fee.
Note: If this is not the reason ("hourlyBillingFlag": true), you can attach the code that you are trying, in order to identify the issue and provide more feedback about it.
How identify the type of billing for the items?
Using SoftLayer_Hardware::getCreateObjectOptions method, you will get a response like this:
38: {
"itemPrice": {
"hourlyRecurringFee": ".024"
"recurringFee": "17"
"item": {
"description": "Windows Server 2012 R2 Standard Edition (64 bit)"
}-
}-
"template": {
"operatingSystemReferenceCode": "WIN_2012-STD-R2_64"
}-
}
"hourlyRecurringFee" means that the item is available per hour and "recurringFee" per month. The "XENSERVER_6.0_64" item is only available for month because it only has "recurringFee" property and not "hourlyRecurringFee"property.

The OS ESXI_5.1_64 is not valid for your configured fixedConfigurationPreset (note based in your comments I assume you are using the S1270_8GB_2X1TBSATA_NORAID you did not copy your code :( ). For that preset the valid OS is ESXI_5.5_64. (VMware ESXi 5.5) So try this code:
{
"parameters": [{
"datacenter": {
"name": "dal01"
},
"hostname": "vijvmware",
"domain": "csc.com",
"hourlyBillingFlag": false,
"fixedConfigurationPreset": {
"keyName": "S1270_8GB_2X1TBSATA_NORAID"
},
"operatingSystemReferenceCode": "ESXI_5.5_64",
"networkComponents": [
{
"maxSpeed": 10
}
]
}]
}
Please keep in mind that the SoftLayer_Hardware::getCreateObjectOptions returns all the options to create bare metal, but not all the convinations of options will work, that´s up to you to create the correct configuration for that you may see the UI (Softlayer´s Portal).

Related

Bad Request Response for Microsoft Intune Device Actions

Our company using Microsoft Graph API to retrieve data about devices. Now we are trying to use it for intune device actions but either we are getting error messages even though we followed everything at Microsoft Graph API docs or nothing happens even though API response success.
we checked the permissions and all needed permissions are given.
we followed docs and tried multiple versions of API URLs mentioned in docs but none of them worked.
we also tried the beta version of API but it didn't work either.
We found some readings about some of these actions work specifically on some OS type or some specific device permissions but we can't find detail on docs.
So we want to use all actions on Intune devices but details on docs are not helpful.
I am getting the following error on related actions
POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/shutDown
{
"error": {
"code": "BadRequest",
"message": "{ \"_version\": 3, \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 2e274924-5fe1-453f-d869-671abf922cfd - Url: https://fef.amsub0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices%28%27e002cd5b-f97f-4212-b0b6-38ae3e77938e%27%29/microsoft.management.services.api.shutDown?api-version=5021-04-16\", \"CustomApiErrorPhrase\": \"\", \"RetryAfter\": null, \"ErrorSourceService\": \"\", \"HttpHeaders\": \"{}\"}",
"innerError": {
"date": "2021-05-31T08:44:54",
"request-id": "c869f3f9-def1-4d7f-93af-16b458bc0b17",
"client-request-id": "2e274924-5fe1-453f-d869-671abf922cfd"
}
}
}
POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/remoteLock
{
"error": {
"code": "BadRequest",
"message": "{ \"_version\": 3, \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 6676f0a0-8895-302e-672b-3cdb66092428 - Url: https://fef.amsub0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices%28%27e002cd5b-f97f-4212-b0b6-38ae3e77938e%27%29/microsoft.management.services.api.remoteLock?api-version=2021-04-07\", \"CustomApiErrorPhrase\": \"\", \"RetryAfter\": null, \"ErrorSourceService\": \"\", \"HttpHeaders\": \"{}\"}",
"innerError": {
"date": "2021-05-31T08:56:10",
"request-id": "a360b06a-fb02-4af3-9f8f-06e138b76288",
"client-request-id": "6676f0a0-8895-302e-672b-3cdb66092428"
}
}
}
I am getting a success response following actions but nothing happens to the devices
POST https://graph.microsoft.com/v1.0/users/{usersId}/managedDevices/{managedDeviceId}/rebootNow
POST https://graph.microsoft.com/v1.0//deviceManagement/managedDevices/{managedDeviceId}/wipe

Create Controller Service using Nifi API REST

I am trying to create a controller service using nifi api rest but I am blocked because when I try:
InvokeHTTP
POST
https://hostname/nifi-api/controller/controller-services
using this json
{
"revision": {
"version": 0
},
"disconnectedNodeAcknowledged": false,
"component": {
"name": "DMCS_try",
"type": "org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer",
"bundle": {
"group": "org.apache.nifi",
"artifact": "nifi-distributed-cache-services-nar",
"version": "1.9.0.3.4.1.1-4"
},
"state": "ENABLED",
"properties": {
"Port": "4555",
"Maximum Cache Entries": "10000",
"Eviction Strategy": null,
"Persistence Directory": null,
"SSL Context Service": null
}
}
}
I got this "error"
Node XXXXXXXXX is unable to fulfill this request due to: Unable to modify the controller. Contact the system administrator. Contact the system administrator.
Controller services can be created in two different places. One place is in the flow as part of a process group so they can be used by processors, the other place is at the controller level for use by reporting tasks.
The URL you specified is for creating a service at the controller level and therefore whatever identity you are using to authenticate as need permissions to modify the controller (WRITE on /controller). The error message is saying you don't have that permission.

How to set PartitionKey property from stream analytics on the output message to service bus?

I have following setup:
Event hub
Service bus topic with a single subscription that accepts all messages from the topic (for my POC)
Above service bus subscription is setup with sessions enabled
Stream analytics (SA) job that moves the events from event hub (the input) into service bus topic (the output). Here is my SA query:
SELECT *, LOWER(source) as Partner
INTO [sb-output]
FROM [test-input]
The above job also sets the partition key for service bus. Used following json in the System Properties of [sb-output] based on the documentation at https://learn.microsoft.com/en-us/azure/stream-analytics/service-bus-topics-output#custom-metadata-properties-for-output:
{ "PartitionKey" : "Partner" }
What I did:
Sent an event to event hub without partition key. This was successful.
{
"specversion": "1.0",
"id": "c8c4faad-9f53-4e43-95ca-c318d673660a",
"type": "CustomerChanged",
"time": "2020-09-09T22:25:40.0148301Z",
"source": "ABCD",
"subject": "system-1",
"datacontenttype": "application/json",
"dataschema": "1.0",
"data": {
"customerNumber": "7879875212123",
"firstName": "John",
"lastName" : "Kennedy"
}
}
The SA successfully moved the event from event hub to service bus.
The service bus subscription succcessfully received the message as shown below:
{
"specversion": "1.0",
"id": "c8c4faad-9f53-4e43-95ca-c318d673660a",
"type": "CustomerChanged",
"time": "2020-09-09T23:22:13.3647825Z",
"source": "ABCD",
"subject": "system-1",
"datacontenttype": "application/json",
"dataschema": "1.0",
"data": {
"customerNumber": "7879875212123",
"firstName": "John",
"lastName": "Kennedy"
},
"EventProcessedUtcTime": "2020-09-09T23:22:14.3776603Z",
"PartitionId": 0,
"EventEnqueuedUtcTime": "2020-09-09T23:22:14.3080000Z",
"Partner": "abcd"
}
As can be seen, the property Partner is at the end of the message.
However the Service Bus Explorer tool shows me that the PartitionKey property has not been set to "abcd" but to some other random string.
Troubleshooting:
To make sure that I can send a message to service bus topic with a specific PartitionKey key, I wrote a sample code that submits the message to service bus topic by explicitly setting the session id property on the message. The service bus explorer showed me that both SessionId as well as PartitionKey properties are set to the correct value.
In ASA output configuration, tried to set following system properties json. Neither worked.
{ "SessionId" : "Partner" }
{ "PartitionKey" : "Partner", "SessionId" : "Partner" }
In ASA output configuration, tried setting both Property Columns (to Partner) as well as System Property Columns (to { "PartitionKey" : "Partner" }). That did not work.
Question:
What am I doing wrong with ASA output configuration that is circumventing the propagation of PartitionKey value from my custom field to service bus message?
Also is there a reason why the System Property Columns does not show the json text that I entered after saving?
Sharing the answer as per the comment by the original poster:
Currently, Microsoft is working on a fix.
Until then, you can use the suggested work around: { "PartitionKey" : "Partner", "SessionId" : "Partner", "Label": "Partner" } in system properties.

LinkedIn Share API creates a share but returns error 500

I'm asking this question on SO, since LinkedIn support is officially moved here.
I'm receiving HTTP 500 response from LinkedIn API endpoint while trying to create a share. This happens sporadically, but it is a quite often event last week or two. The weird part is that the share being created successfully.
Please advise. Could it be caused by spiking users activity on social media due to COVID19?
For the reference, here is request body POST-ed to https://api.linkedin.com/v2/shares (real ids are replaced).
{
"owner": "urn:li:organization:111111",
"text": {
"text": "Text text text"
},
"content": {
"contentEntities": [
{
"entity": "urn:li:digitalmediaAsset:111111"
}
],
"shareMediaCategory": "IMAGE"
},
"distribution": {
"linkedInDistributionTarget": {
"connectionsOnly": false,
"visibleToGuest": true
}
}
}
Response:
{
"message": "Internal Server Error",
"status": 500
}

Mimecast API authentication issue

trying to connect to endpoint with all needed headers defined:
https://us-api.mimecast.com/api/login/login.
Error message receieved : 0018 Client update required
Did anyone encounter/solve this issue?
{
"meta": {
"status": 401
},
"data": [],
"fail": [
{
"key": {
"username": "datadash#itprosusa.com",
"tokenType": "key",
"verifyOnly": false
},
"errors": [
{
"code": "err_xdk_client_update_required",
"message": "0018 Client update required",
"retryable": false
}
]
}
]
}
I came across the same error message when trying to get Access key and Secret Key. You can actually get these in the Mimecast portal UI by going to: Administration | Services | API Applications, then Add API Application fill in the details and wait 30 minutes. After 30 minutes click on your newly created API application and select Create Keys, fill in the required information and it will provide you with your Access key and Secret key used for API calls.
If this doesn't answer your question or help you I would suggest getting in contact with Mimecast Support, they are usually pretty good!