When using the OLP CLI I get error: "Unexpected HRN entity type" - heremaps

Using the OLP CLI, how do I determine the HRN to use? When I take the HRN that shows in the console for my project and call
./olp app domain list "hrn:here:authorization::myorg:project/projectId"
I get the error:
"error_description": "errorCode: '400288'. Unexpected HRN entity type for requested resource : hrn authorization:myorg:project/projectId",
(Obviously I’ve replace the actual IDs here)
I can't see any documentation that relates to this error message, or about how I determine the HRN to use. In fact this HRN is the only one I can find in the console.
(Cross-posted from Slack workspace for reach)

The error is connected to the fact that you pass a project HRN instead of an application HRN. According to the documentation the command accepts only application HRNs.
olp app domain list <app HRN> [command options]
The HRN for the application can be retrieved using olp app list. The documentation of the command can be found here. For the case when the application has been created via CLI.
If you want get the HRN for the application created on the portal. Please use the following steps:
Go to Access Manager.
Find your application in the list of apps.
Open Developer Tools in the browser and refresh the page of the application.
Find trustedDomainsEnabled request and check the URL. It should contain URL encoded HRN as the part of URL before /trustedDomainsEnabled See the picture from Chrome.
I know it is tricky, but this is the only solution I found.

Related

Using AWS EC2 API (https) with EC2 Launch Templates - The parameter LaunchTemplate is not recognized

I am extremely new with APIs and can not figure this out.
I have a use case where I want to call the AWS EC2 Rest API over https to start an instance from a Launch Template. I am using "RunInstances" 1 to attempt this. I have scrolled through the document and included all of the required parameters.
I then added "ImageId" to the test and got a good run (no issues with authentication, etc). The default instance was created.
The issue is that I cannot figure out how to get the API to accept the "LaunchTemplate" option. I either get "The parameter LaunchTemplate is not recognized" or a "400 - bad request" error.
In postman I have:
Postman Screenshot with the RunInstances call set up and the full URL visable
This is the link to the "LaunchTemplateSpecification" object documentation (linked from 1 also) 3
Can someone help me figure out how to construct the API request for the "LaunchTemplate" parameter?
Also, my web searches have not revealed HTTPS (web url) examples only CLI examples (none for this paramater in the docs either). If someone found a link that I could not, please send it my way.
Thanks!
#stdunbar was correct so far as the LaunchTemplate.LaunchTemplateName parameter was concerned.
I submitted a case to AWS support and received a response. I was missing a "version" parameter.
The correct parameter set is as follows:
https://us-east-1.ec2.amazonaws.com/?
Action=RunInstances&
MaxCount=1&
MinCount=1&
LaunchTemplate.LaunchTemplateName=Testing-Template&
Version=2016-11-15
Here is an updated Image of Postman (for learners like me) 1

JDBC connection to Google Cloud Spanner parameters

I have a Google Cloud Spanner instance and database.
I am trying to connect to it:
But I don't know what to fill the "Custom JDBC URL" , "User id" or "User Password" with as this parameters are not given in the website or configured when creating the instance.
EDIT:
I have added some information leading to the following parameters:
My full path is now:
jdbc:cloudspanner:/projects/bupry-332316/instances/genupry-sql-test/databases/genupry-db-1?credentials=D:\Genexus\Models\Wultu\bupry-332316-f760bf33afc1.json;autocommit=false;lenient=true
However I am still getting an error, which is the following
As #Catherine O mentioned in a comment: Please include what tool you are using to try to connect to Cloud Spanner.
Based on the screenshot you included, I think there are a couple of things that you need to change:
You now have the JDBC URL in the field Custom JDBC Driver. The Custom JDBC driver field should be filled with the name or reference to the .jar file of the JDBC driver (exactly what this tool expects is impossible to know without knowing what tool it is).
The string that you entered into the Custom JDBC driver field is what should be entered in Custom JDBC URL.
User ID and Password should be left empty.
Cloud Spanner does not use a User ID and Password for authentication. Instead it uses Google Cloud credentials. Add these to the JDBC URL by adding something like ;credentials=/path/to/credentials.json to the JDBC URL (the path must point to a valid credentials file). See also https://googleapis.dev/java/google-cloud-spanner-jdbc/latest/com/google/cloud/spanner/jdbc/JdbcDriver.html for a full example.
EDIT: Client information and new Stacktrace shared
The stacktrace that you are now getting seems to indicate that the driver is being picked up and a connection is being made, but that there is some internal error in the JDBC driver:
Which version of the driver are you using?
Are you using a shaded jar with all dependencies? (see https://github.com/googleapis/java-spanner-jdbc#creating-a-shaded-jar)?
If you are not using a shaded jar, how are you making sure that all the additional driver dependencies are also loaded by GeneXus?

Invalid argument (HTTP 400): The request contained an invalid argument. When trying to create a new Datastore instance

I'm logged in as the account owner/admin on console.cloud.google.com web control panel. From in there I'm trying to add a new cloud Datastore instance. When I click "Create entity" I get to a page where I have to choose the region from a drop down. No matter what region I choose, I get and error when pressing "next".
The page is showing a spinner for a couple of seconds with "Setting region" (see screenshot).
Then it fails with the message: "Invalid argument (HTTP 400): The request contained an invalid argument" (see screenshot).
I tried with different browsers too.
What could be going wrong here?
After a while I ended up running gcloud app describe in the cloud console. It told me to first run: gcloud app create. After doing that and selecting a region again, I got some more useful error output:
ERROR: (gcloud.app.create) INVALID_ARGUMENT: The request contained an invalid argument.
- '#type': type.googleapis.com/google.rpc.BadRequest
fieldViolations:
- description: App Engine does not support project identifiers with a ":" character.
field: id
So apparently the issue was that the id of my project had a colon in it - which I don't think I ever choose, it was an old project. Creating a new works :-D

Login error to Sharepoint 2013 repository using openCMIS Workbench

using the OpenCMIS Workbench 0.8.0, I can load the sharepoint 2013 (GA) repositories fine but get the following error when I try to login to one of the repositories such as Documents:
"Invalid Argument: One or more of the input parameters to the service method is missing or invalid"
Found a blog with some instructions but those didn't work for me:
http://dhartford.blogspot.com/2013/01/sharepoint-2013-w-apache-chemistry-cmis.html?showComment=1359398536275#c6910049622927723676
Note: Here is the service url format that I am using:
http://myserver.xxx.com/MYSITE/cmis/_vti_bin/cmis/rest?getRepositories
Does anybody know what the problem is?
Here is the stack trace from Workbench:
> 11:05:17 DEBUG ncmis.client.bindings.spi.http.HttpUtils: GET http://MYServer/_vti_bin/cmis/rest/f8134afe-176a-4c48-9fd2-a9f97e5dc91d?getTypeDefinition&typeId=cmis%3Adocument
> 11:05:17 TRACE ncmis.client.bindings.spi.http.HttpUtils: GET http://MYServer/_vti_bin/cmis/rest/f8134afe-176a-4c48-9fd2-a9f97e5dc91d?getTypeDefinition&typeId=cmis%3Adocument > Headers: {null=[HTTP/1.1 400 One or more of the input parameters to the service method is missing or invalid.], Server=[Microsoft-IIS/7.5], SPRequestDuration=[124], SPIisLatency=[27], X-FRAME-OPTIONS=[SAMEORIGIN], Content-Type=[plain/text; charset=utf-8], Date=[Wed, 30 Jan 2013 19:05:02 GMT], X-SharePointHealthScore=[1], Cache-Control=[private], X-Content-Type-Options=[nosniff], X-Powered-By=[ASP.NET], X-MS-InvokeApp=[1; RequireReadOnly], request-id=[5ef0f99b-24ec-909f-6192-6eaf6feccabc], Content-Length=[167], MicrosoftSharePointTeamServices=[15.0.0.4420], SPRequestGuid=[5ef0f99b-24ec-909f-6192-6eaf6feccabc], X-AspNet-Version=[4.0.30319]}
> 11:05:17 ERROR hemistry.opencmis.workbench.ClientHelper: CmisInvalidArgumentException: One or more of the input parameters to the service method is missing or invalid.
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: One or more of the input parameters to the service method is missing or invalid.
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:423)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:554)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getTypeDefinitionInternal(AbstractAtomPubService.java:821)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:88)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:137)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getTypeDefinition(SessionImpl.java:518)
at org.apache.chemistry.opencmis.workbench.model.ClientSession.createOperationContexts(ClientSession.java:244)
at org.apache.chemistry.opencmis.workbench.model.ClientSession.createSession(ClientSession.java:195)
at org.apache.chemistry.opencmis.workbench.LoginDialog$2.actionPerformed(LoginDialog.java:204)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2006)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2329)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:398)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:253)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:247)
> 11:05:17 ERROR hemistry.opencmis.workbench.ClientHelper: Error code: 0
Another thing that I noticed is that none of the URLs from the service document work when I use them from a browser. So i think the service doc doesn't have valid urls.
Give the latest CMIS Workbench a try:
https://repository.apache.org/content/repositories/orgapachechemistry-166/org/apache/chemistry/opencmis/chemistry-opencmis-workbench/0.9.0-beta-1/chemistry-opencmis-workbench-0.9.0-beta-1-full.zip
Didn't have the time to post the solution but here is basically what I had to do after getting help from Microsoft. I was missing Step B below:
A. Activate the CMIS feature for your sub site
Go to the Sharepoint 2013 Central Administration
Click on the Sites link and then click on your sub site. Or navigate directly to it. eg http://myserver/mysitename
Click on the Settings icon (gear top right) and then select Site Settings
Under Site Actions, click Manage Site Features
Click Activate for the CMIS producer.
B. Check Alternate Access Mappings
Go to the Central Administration page
Under System Settings, click Configure Alternate Access Mappings
There should be at least two urls. One with server short name and one with server full name.
If the url is missing, click Add Internal Urls
For the Alternate Access Mapping Collection, click the No Selection link, change and select:
SharePoint - 80
Set the url such as http://myserver.usa.com (full domain name)
Set Zone: any such as Intranet
Click Save
My suggestion would be to:
start the Workbench, do not login yet
close the connection popup
open the Log window with the button on the top right corner
increase the log level to DEBUG or more verbose
try to connect
check the logs again, possibly posting them here
The actual root of the problem turned out to be a missing Alternate Access Mapping. Not sure why it was missing in the first place.
So I added an internal url that has the full server name address instead of just the short name. A microsoft dev helped me figure this out.
Remove any proxy settings from internet explorer before you launch OpenCMIS, also reset any system wide proxy settings: netsh winhttp reset proxy
Make sure your share point web app is set to accept only basic authentication as described in the blog post you mentioned
Removing the proxy from IE and system wide fixed my problem .. I can now login to sharepoint 2013 using OpenCMIS
ah before i forget the URL syntax should be http://server:port/_vti_bin/cmis/rest/?getRepositories
Good luck

recieving error The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.<nativehr>0x800401e6

After building and deploying, checked the solution management from Central administration and it's up, a simple web service method that only created a Document Library list with a few columns when trying to retrieve the wsdl or even just by calling the WS fromt the adress since its a void method I recieve some error:
The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators.<nativehr>0x800401e6</nativehr><nativestack></nativestack>
The very same method runs fine when called from another web service project that is already deployed so there's nothing wrong with the code. I'm most probably doing something wrong but can't figure.
The system is running on a win server 2008 with sharepoint 2010, framework 3.5 and "ANY" cpu mode.
thank you!
[edit]
Managed to get rid of the previous error by removing asmx extention from the blocked file list in central administration now instead I'm recieving a 404 error:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /_layouts1/my2claims/tt_claims.asmx
it must run under the same application pool as SharePoint