backup AWS Custom JSON - aws-opsworks

I would like to backup a number of the AWS Stacks' Custom JSON files. I can't seem to find an API that will extract them for me. Is there an applicable API available? If so, what?

I Assume you are using CloudFormation:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-get-template.html

Related

Bitbucket API search single file

I want to be able to search/read for a single file without needing the path from bitbucket.
Is there a way to do that through the Bitbucket API?
Haven't found an API call for this.
However there's now a "search code" functionality you may utilize for this, as it's also returns file names.
It's not an API call, supported only by browser.
You'll also have to enable "code searching" for this repository beforehand.
the call goes like so: "https://bitbucket.org/!api/2.0/users/%7Ba2bfcba3-3ec3-4ffe-a6fb-4ce8d138d2dc%7D/search/code?search_query=repo%3A%7B413e33c2-fdb6-4943-b123-82d40bcf4950%7D%20eks&fields=%2Bvalues.file.commit.repository.mainbranch.name"

Generating Swagger Docs in Firebase Cloud Functions project

Is it possible to generate Swagger Spec file from function comments in firebase cloud functions? If so, how can we do it?
I see the cloud functions code to be more like serverless, so wondering if this is possible.
I haven't found an automatic way, but there are plenty of libraries to choose from.
I'm using express and nodejs in my Firebase Function implementations, and for me,
Swagger doc generation can be implemented via the following libraries:
https://github.com/scottie1984/swagger-ui-express
https://github.com/Surnet/swagger-jsdoc
You can find other libraries at:
https://swagger.io/tools/open-source/open-source-integrations/
This will create a new HTTP endpoint, which will serve an HTML page of a swagger doc.
There is not an automatic way to do this at this time. I think you could build your own but seems like it would be a lot of work.

Custom Report in alfresco?

Currently i am generating a report (we are getting files are uploaded within a time stamp).
I am getting all files and folders.Iterating the result and checking created date one by one.That is taking too much time approx 8 min to revert with resuls.Can anyone tell me is there any alfresco report api that i can use? or using solr how to fetch the result?
I like to follow an approach which is maybe not really orthodox. Usually, you don't want to report on all documents, only document using a specific type or aspect. So, what I do is to create a Java behaviour on onCreate, onUpdate and onDelete that updates a custom database with only the metadata that I'm interested in. Then, I can connect any OOTB reporting tools such as Pentaho, Jasper or Tableau. You have of couse some other traditional alternatives, such as:
Using this module developed by a community member: http://fcorti.com/alfresco-audit-analysis-reporting/
Or using the module provided by Alfresco: http://docs.alfresco.com/analytics/concepts/analytics-using.html
SOLR/Lucene is not an option, querying DB directly is not an option either (performance wise).
I would suggest using one of the options available (AAAR for instance) or developing something on your own following the same principles.
I did little bit investigation on this and found below link.
http://docs.alfresco.com/4.0/tasks/audit-recording-values.html
I think you can user auditService in alfresco and get your things done.There are few alfresco webservices(related to audit) already available which will allow you to filter response.In case if you need to customize it , than you can create webscript and use auditService in it.
You can use below url for browsing all your alfresco webservice.
http://localhost:8080/alfresco/service/index

h5ai use on a CDN?

Is it possible to use the h5ai "pretty" index UI on a CDN? I'm using Dreamhosts' DreamObjects and have it installed correctly (I've used it before on standard hosting sites). Am only getting an XML parse of the data back.
See it here: https://randassets.objects.cdn.dream.io/
Any thoughts? Thanks!
I guess what you would like to see is a pretty-looking list of files and directories on a web page, like a file browser to explore the content of your DreamObjects bucket. If that's the case, hi5ai would not work because from what I understand, hi5ai doesn't natively speak neither the S3 API nor the OpenStack Swift ones. hi5ai relies on a web server and a php interpreter, which are not provided by DreamObjects.
Maybe if you expand on your use case I can suggest you other tools you could use to browse your collection of files, something like ownCloud (and more specifically how to configure DreamObjects with ownCloud) or others.

Reference docs for Azure Resource Templates

I am looking for reference docs for the Azure Resource Manager JSON templates. Does anyone know if there is reference material for these templates?
There is general reference for required parameters etc like at Create a template deployment.
I am basically looking for the full availability so I can correspond setup on the portal to the JSON template. Also availability of features with apiVersion releases. I remember there being a MSDN documentation for the changelog with api version releases but cannot find it now.
If you create a VM with the desired settings, extensions etc then you can view their json template via https://resources.azure.com/
This will give some visibility into the Classic* templates.
All of the ARM templates can be found on GitHub here: https://github.com/Azure/azure-resource-manager-schemas.
It includes preview templates and should provide all the information you're after to determine which features are present in which apiVersion release.
Microsoft has finally created what I was looking for 🎉: full documentation is now available at https://learn.microsoft.com/en-au/azure/templates/
After some digging I managed to get the following list of schemas:
http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json
http://schema.management.azure.com/schemas/2014-06-01/Microsoft.Web.json
http://schema.management.azure.com/schemas/2014-04-01-preview/Microsoft.Sql.json
http://schema.management.azure.com/schemas/2014-04-01/Microsoft.Insights.json
http://schema.management.azure.com/schemas/2014-02-26/microsoft.visualstudio.json
http://schema.management.azure.com/schemas/2014-04-01-preview/Microsoft.Cache.json
http://schema.management.azure.com/schemas/2014-04-01/Microsoft.BizTalkServices.json
http://schema.management.azure.com/schemas/2014-08-01/Microsoft.Scheduler.json
http://schema.management.azure.com/schemas/2014-04-01/SuccessBricks.ClearDB.json
http://schema.management.azure.com/schemas/2015-01-01/Microsoft.Resources.json
http://schema.management.azure.com/schemas/2015-01-01/Microsoft.Authorization.json
http://schema.management.azure.com/schemas/2014-10-01-preview/Microsoft.Authorization.json
This list notably excludes:
Microsoft.ClassicCompute
Microsoft.ClassicStorage
Microsoft.ClassicNetwork
So I guess we're left to figure stuff out from the templates on those
To my mind we can dig that way:
open the azure-resource-manager schemas
Look at the main form below:
If you open properties, you will find the format that we need to fill:
open parameters and look at the structure:
$ref: #/definitions/parameter invite us to look at the same documents in definitions.parameters where you will find some documentation (like value you can use etc):
finally, if you look to properties.resources, you will find a list of url like:
{ "$ref": "http://schema.management.azure.com/schemas/2015-07-01-preview/Microsoft.ServerManagement.json#/resourceDefinitions/node" }
{ "$ref": "http://schema.management.azure.com/schemas/2015-07-01-preview/Microsoft.ServerManagement.json#/resourceDefinitions/gateway" }
if you open one of these url, you will find the JSON format you are looking for (here is a part of the first one):
There is not much available...
Azure Resource Manager Template Language
https://azure.microsoft.com/en-us/documentation/articles/resource-group-authoring-templates/
And then you can look at the different json.schemas that I have managed to find
deploymentTemplate
http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json
visualstudio
http://schema.management.azure.com/schemas/2014-02-26/microsoft.visualstudio.json
Sql
http://schema.management.azure.com/schemas/2014-06-01/2014-04-01-preview/Microsoft.Sql.json
Web
http://schema.management.azure.com/schemas/2014-06-01/Microsoft.Web.json
deploymentParameters
http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json
If you use Visual Studio to edit the json-template file you get intellisense (sometimes) which help a bit. But the lack of documentation is really annoying...for example I have no clue if the schemas listed above are the most recent or not, and I have no idea where to find which one is the most resent.
Edit:
I came across the list of additions and changes to the Service Management APIs. Seems to be a bit outdated, 2015-01-01 is the current version and it's not there.
Edit2:
With the Iaas updates at Build 2015, there seems to also be a lot of Azure Quickstart Templates. At minimum, they have the particular cases I was looking for with storage accounts.

Resources