Git Product home page Git Product logo

Comments (3)

chelnak avatar chelnak commented on July 29, 2024

Hello,

Two things caught my eye with your payload:

  1. entitledCatalogItems and entitledResourceOperations should be camel case
  2. entitledCatalogItems should probably be an array of catalog items

This payload worked for me:

{
    "description": "",
    "entitledCatalogItems": [
        {
            "approvalPolicyId": null,
            "active": true,
            "catalogItemRef": {
                "id": "9dcc9ce5-cf87-49e0-9890-397611c863c6",
                "label": "CentOS 6.6 x64 Base"
            }
        },
        {
            "approvalPolicyId": null,
            "active": true,
            "catalogItemRef": {
                "id": "c612cb15-749b-4782-b31a-b1e776980cdd",
                "label": "CentOS Application Stack"
            }
        }
    ],
    "entitledResourceOperations": [
        {
            "approvalPolicyId": null,
            "active": true,
            "externalId": "csp.places.iaas.item.dialog.AssociateFloatingIP",
            "resourceOperationType": "EXTENSION",
            "resourceOperationRef": {
                "id": "78f304c9-48ba-4cf2-870e-fbf8f3b9526d",
                "label": "Associate Floating IP"
            },
            "targetResourceTypeRef": {
                "id": "Infrastructure.Machine",
                "label": "Machine"
            }
        },
        {
            "approvalPolicyId": null,
            "active": true,
            "externalId": "Infrastructure.Machine.Action.CancelReconfigure",
            "resourceOperationType": "ACTION",
            "resourceOperationRef": {
                "id": "20bce01a-d75c-49d8-9dfc-1032a91003b4",
                "label": "Cancel Reconfigure"
            },
            "targetResourceTypeRef": {
                "id": "Infrastructure.Machine",
                "label": "Machine"
            }
        },
        {
            "approvalPolicyId": null,
            "active": true,
            "externalId": "composition.resource.action.deployment.changelease",
            "resourceOperationType": "ACTION",
            "resourceOperationRef": {
                "id": "27dff6c8-c54b-4232-ade7-10e67190a7d0",
                "label": "Change Lease"
            },
            "targetResourceTypeRef": {
                "id": "composition.resource.type.deployment",
                "label": "Deployment"
            }
        }
    ],
    "entitledServices": [
        { 
            "approvalPolicyId": null,
            "active": true,
            "serviceRef": {
                "id": "9d2b08e6-8f11-4d0d-8bdb-512b82785651",
                "label": "IaaS"
            }
        }
    ],
    "expiryDate": null,
    "lastUpdatedBy": "user",
    "lastUpdatedDate": "2016-10-09T18:27:19.117Z",
    "name": "Default Entitlement 2",
    "organization": {
        "tenantRef": "Tenant01",
        "tenantLabel": "User",
        "subtenantRef": "e5065804-afde-4a48-a741-3a6ae8e5406d",
        "subtenantLabel": "Default Business Group"
    },
    "principals": [
        {
            "tenantName": "Tenant01",
            "ref": "[email protected]",
            "type": "USER",
            "value": "user"
        }
    ],
    "priorityOrder": 1,
    "status": "ACTIVE",
    "statusName": "Active",
    "localScopeForActions": true,
    "version": 3
}

from powervra.

saveriosalatino avatar saveriosalatino commented on July 29, 2024

Thanks, my fault! After the two changes names of entitledCatalogItems and entitledResourceOperations everything works fine and change of entitledCatalogItems in array everything works fine.
I've previously removed CamelCase from Get-VRAEntitlement | ConvertTo-JSON output from almost all string(s) in JSON output because organization, principals and some other value must be lowercase, otherwise I get other error on $JSON | New-VRAEntitlement .

from powervra.

chelnak avatar chelnak commented on July 29, 2024

Closing thread

from powervra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.