What does the CDKToolkit's BootstrapVersion SSM parameter represent? - aws-cdk

I am using AWS CDK toolkit to create our infrasture. I created helloworld-stack.ts file and when I do cdk synth then this process creates HelloWorldStack.template.json file.
In this file we have some auto generated elements. Like this one.
Now, I am not able to understand, how bootstraping pushes this "/cdk-bootstrap/hnb659fds/version" to SSM store and why this key always has value 14.
Can someone help me to understand this behaviour?
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},

After reading AWS offical doc regarding bootstrapping, I got the answer.
https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html
In this doc, they mentioned it this is their template version.

Related

How to copy an excel file using microsoft graph API?

I am trying to copy an excel file in the same folder in my sharepoint account using following API - POST /drives/{driveId}/items/{itemId}/copy but it gives message 'Operation not supported'.So how to do this?
As discussed in the comments you can try the below scenario.
I have a folder in my drive and it has an excel file. I am trying to copy that file into same folder by using the below call.
https://graph.microsoft.com/v1.0/sites/{siteid}/drives/{driveid}/Items/{file id which you want to copy}/copy
Request Body:
{
"parentReference": {
"driveId": "{Same driveid of above call}",
"id": "{Folderid}"
},
"name": "contosoplan(copy).xlsx"
}
Give a try with this. And as you said the apiversion=2.1 should not me used in some scenarios according to this Github Thread as it doesn't have feature parity with default version.

How to use "Method: projects.repos.create" to mirror bitbucket repo

I want to Mirror bitbuket repo in Google Source Repository so, what should I need to pass in below json request body.
{
"mirrorConfig": {
"url": "",
"deployKeyId": "",
"webhookId": ""
},
"name": "",
"pubsubConfigs": {}
}```
As mentioned in the projects.repos resource reference, the mirrorConfig field is currently set to read-only, so it is not possible to set any values for it manually.
Currently it is not possible to mirror the repository via the API, you will have to connect to the external sources through the Cloud Console, like explained in the Mirroring a Bitbucket repository documentation.

FIWARE Metadata in IoTAgent

I try to set up a TTN based LoRaWAN Monitoring of my Gateways and devices inside a FIWARE-Environment. Therefore it would be essential to access data not in payload_field of the MQTT-Broker of TTN.
I wonder if it is possible to access field like counter, port, app_id and metadata.
I did not find a possibility yet. Does any of you face the same problem and got a solution to this challenge?
I use the following relevant FIWARE-components in a docker environment:
fiware/orion:2.2.0
fiware/iotagent-lorawan:1.2.3
mongo:3.6.8
If you need to receive metadata directly from LoRaWAN, you will have to customize the code within the LoRaWAN IoT Agent - this just passes measures by default, but the IoT Agent node lib interface is capable of receiving metadata as well.
Alternatively a recent PR Request for the IoT Agent node lib allows for additional static metadata to be added during the provisioning stage and sent as part of the requests to the context broker. You would need to use the latest development code base as the library hasn't been ported to the LoRaWAN IoT Agent yet - amend the iotagent-node-lib dependency in the package.json as shown:
"dependencies": {
...
"iotagent-node-lib": "git://github.com/telefonicaid/iotagent-node-lib.git#master",
...
},
... etc
The documentation can be found here
Attributes with metadata are provisioned with an additional parameter as shown:
"attributes": [
{"object_id": "s", "name": "state", "type":"Text"},
{"object_id": "l", "name": "luminosity", "type":"Integer",
"metadata":{
"unitCode":{"type": "Text", "value" :"CAL"}
}
}

Multiple target environments and AWSGoogleSignIn

Hello I am working with multiple AWS frameworks on an Ios project. The app is setup to target the specific backend environments though a dev and prod target in xcode.
This generally works fine though the use of constants and macros to use the different identity pools etc on build.
However I am now using AWSGoogleSignInProvider to link google sign-in and cognito. this requires a awsconfiguration.json file in the project which contains the google id and the cognito Id.
{
"Version": "1.0",
"CredentialsProvider": {
"CognitoIdentity": {
"Default": {
"PoolId": "***",
"Region": "***"
}
}
},
"IdentityManager": {
"Default": {}
},
"GoogleSignIn": {
"ClientId-iOS": "***",
"Permissions": "email,profile,openid"
}
}
Im unsure on how i can target dev/prod since i would need to use different pool ids depending on environments. Can't use two files with different names and targets since naming is "immutable" and cant use any macros in the Json file itself.
By looking at the AWS framework it seams there is no way to manually set any of these, and the shared instance gets the google id through the the Json file on instantiation or throws.

Getting Issue Type Scheme and Workflow Scheme for JIRA project using REST API

I'm doing an integration for JIRA using REST API 6.2.6. One thing that I need to do is to get Issue Type Scheme and Workflow Scheme for a project.
What I tried:
Issue Type Scheme
The only thing that I can get right now is a list of issue types using /rest/api/2/project/{projectIdOrKey}. I can't see any way of getting an ID of Issue Type Scheme. Looking at API there is no any endpoints for issue type schemes, so I guess it's not possible.
Workflow Scheme
/rest/api/2/project/{projectIdOrKey} doesn't return any information about Workflow Scheme. But there is an endpoint /rest/api/2/workflowscheme/{id}, so that means that it's possible to get ID somehow... At the end I want to get a list of workflows for a project to check transitions for an issue type.
Question
Is there any way to get the data I want? Maybe there is some hidden not documented API?
Note: I'm using only JIRA REST API.
This is what you want.
/rest/projectconfig/1/workflowscheme/{projectIdOrKey}
Latest Jira documentation provides information about the APIs which can be used to fetch details for issuetype scheme and workflow scheme. Below are the APIs which can be used for the same,
Fetching Issue type Scheme for a project Issuetype Scheme API
Rest URL:GET https://your-domain.atlassian.com/rest/api/2/issuetypescheme/project?projectId={projectId}'
Sample Response:
{
"maxResults": 100,
"startAt": 0,
"total": 3,
"isLast": true,
"values": [
{
"issueTypeScheme": {
"id": "10000",
"name": "Default Issue Type Scheme",
"description": "Default issue type scheme is the list of global issue types. All newly created issue types will automatically be added to this scheme.",
"defaultIssueTypeId": "10003",
"isDefault": true
},
"projectIds": [
"10000",
"10001"
]
}
]
}
Fetching workflow scheme configured for a project Workflow Scheme API
REST URl: GET https://your-domain.atlassian.com/rest/api/2/workflowscheme/{id}
Sample Response:
{
"id": 101010,
"name": "Example workflow scheme",
"description": "The description of the example workflow scheme.",
"defaultWorkflow": "jira",
"issueTypeMappings": {
"10000": "scrum workflow",
"10001": "builds workflow"
},
"draft": false,
"self": "https://your-domain.atlassian.net/rest/api/2/workflowscheme/101010"
}
As far as I am aware you can get the correct XML or JSON response from the
REST API:
/rest/api/2/project/{projectIdOrKey}.
Then if you want to find out the information about the workflowscheme you can do this programmatically by using the following information.
If you have an issue that you want to use then you can use it to get the workflowscheme id by doing this this:
ComponentAccessor.getWorkflowSchemeManager().getWorkflowScheme(issue.getProject()).get("id");
Then once you get the id of the workflow scheme e.g. 10, you then can get the scheme generic value as follows:
GernericValue scheme = ComponentAccessor.getWorkflowSchemeManager().getScheme(10);
Now that you have the scheme you then can get all of the workflows that are referenced in the scheme by doing this:
Collection<JiraWorkflow> workflows = ComponentAccessor.getWorkflowManager().getWorkflowsFromScheme(scheme);
Then if you want to get one workflow you will have to use:
workflows.iterator().next():
Also note, that workflows are identified by their name in JIRA as there are no id's in JiraWorkflow.
So that would be the approach I would use if I wanted to find out the workflowscheme information so I could use the id to then use the REST API:
But the main reason that you might not be able to find a workflowscheme is because it is not present in the JIRA's Issue.
Using this HTTP and inputting it into "Postman" as a get request will return all the JSON information.
Using this https://jira.atlassian.com/browse/JRA-25121/project/23 will return all the information for that project. Then using this REST API:
/rest/api/2/workflowscheme/{id}
Using this HTTP get request https://jira.atlassian.com/browse/JRA-25121/workflow/45 will get you the returned XML or JSON workflow information too.

Resources