UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 21.9 kB
{"openapi":"3.0.0","info":{"description":"The Azure Instance Metadata Client","title":"InstanceMetadataClient","version":"2019-08-15","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/imds/data-plane/Microsoft.InstanceMetadataService/stable/2019-08-15/imds.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"imds","x-tags":["Azure","Microsoft"]},"paths":{"/attested/document":{"get":{"description":"Get Attested Data for the Virtual Machine.","operationId":"Attested_GetDocument","parameters":[{"$ref":"#/components/parameters/ApiVersionParameter"},{"description":"This is a string of up to 32 random alphanumeric characters.","in":"query","name":"nonce","required":false,"schema":{"type":"string"},"examples":{"Get Attested Data for the VM":{"value":"abcde12345"}}},{"$ref":"#/components/parameters/MetadataParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestedData"},"examples":{"Get Attested Data for the VM":{"$ref":"#/components/examples/Get_Attested_Data_for_the_VM"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/identity/info":{"get":{"description":"Get information about AAD Metadata","operationId":"Identity_GetInfo","parameters":[{"$ref":"#/components/parameters/MetadataParameter"},{"$ref":"#/components/parameters/ApiVersionParameter"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityInfoResponse"},"examples":{"Get Identity Info for the VM":{"$ref":"#/components/examples/Get_Identity_Info_for_the_VM"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"}}}}},"tags":["Get metadata information"]}},"/identity/oauth2/token":{"get":{"description":"Get a Token from Azure AD","operationId":"Identity_GetToken","parameters":[{"$ref":"#/components/parameters/MetadataParameter"},{"description":"This is the urlencoded identifier URI of the sink resource for the requested Azure AD token. The resulting token contains the corresponding aud for this resource.","in":"query","name":"resource","required":true,"schema":{"type":"string"},"examples":{"Get Identity Token for the VM":{"value":"https://vault.azure.net"}}},{"$ref":"#/components/parameters/ApiVersionParameter"},{"description":"This identifies, by Azure AD client id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with object_id and msi_res_id.","in":"query","name":"client_id","required":false,"schema":{"type":"string"}},{"description":"This identifies, by Azure AD object id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with client_id and msi_res_id.","in":"query","name":"object_id","required":false,"schema":{"type":"string"}},{"description":"This identifies, by urlencoded ARM resource id, a specific explicit identity to use when authenticating to Azure AD. Mutually exclusive with client_id and object_id.","in":"query","name":"msi_res_id","required":false,"schema":{"type":"string"}},{"description":"This indicates the authority to request AAD tokens from. Defaults to the known authority of the identity to be used.","in":"query","name":"authority","required":false,"schema":{"type":"string"}},{"description":"If provided, the value must be 'true'. This indicates to the server that the token must be retrieved from Azure AD and cannot be retrieved from an internal cache.","in":"query","name":"bypass_cache","required":false,"x-ms-enum":{"modelAsString":true,"name":"BypassCache"},"schema":{"type":"string","enum":["true"]}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityTokenResponse"},"examples":{"Get Identity Token for the VM":{"$ref":"#/components/examples/Get_Identity_Token_for_the_VM"}}}}},"default":{"description":"Error response describing why the operation failed.","headers":{"Www-Authenticate":{"description":"This is the response header containing a challenge for the Basic scheme with a realm value","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityErrorResponse"}}}}},"security":[{},{"basic_auth":[]}],"tags":["Get token"]}},"/instance":{"get":{"description":"Get Instance Metadata for the Virtual Machine.","operationId":"Instances_GetMetadata","parameters":[{"$ref":"#/components/parameters/ApiVersionParameter"},{"$ref":"#/components/parameters/MetadataParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Instance"},"examples":{"Get Instance Metadata for the VM":{"$ref":"#/components/examples/Get_Instance_Metadata_for_the_VM"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"servers":[{"url":"http://169.254.169.254/metadata"},{"url":"https://169.254.169.254/metadata"}],"components":{"examples":{"Get_Attested_Data_for_the_VM":{"value":{"encoding":"pkcs7","signature":"MIID2gYJKoZIhvcNAQcCoIIDyzCCA8cCAQExDzANBgkqhkiG9w0BAQsFADCBggYJKoZIhvcNAQcBoHUEc3sibm9uY2UiOiIxMTExMTExMTExIiwicGxhbiI6eyJuYW1lIjoiIiwicHJvZHVjdCI6IiIsInB1Ymxpc2hlciI6IiJ9LCJ2bUlkIjoiMDJhYWI4YTQtNzRlZi00NzZlLTgxODItZjZkMmJhNDE2NmE2In2gggI/MIICOzCCAaSgAwIBAgIQQWsFjXN35oBJKFXI3QrM3TANBgkqhkiG9w0BAQQFADArMSkwJwYDVQQDEyB0ZXN0c3ViZG9tYWluLm1ldGFkYXRhLmF6dXJlLmNvbTAeFw0xODExMDgxODUzMDRaFw0xODEyMDgxODUzMDNaMCsxKTAnBgNVBAMTIHRlc3RzdWJkb21haW4ubWV0YWRhdGEuYXp1cmUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEi0FVslYnUX+MneC7ERMU4ZM88z4J80r7RPgvzxCPNhXUQlWm3cmVRZMD8kKMv7brkvEsATP7Ak60/I/XEtOga4LGCvMaQa8I/MW8IhSyp2Vj015glAiV8TeUI5DuOIOS96lQvM+G7bt23swkIwVjm1u1ViTZiKKytwpY/EGqzQIDAQABo2AwXjBcBgNVHQEEVTBTgBAt3MRgJmEoUMiPy7k06cLfoS0wKzEpMCcGA1UEAxMgdGVzdHN1YmRvbWFpbi5tZXRhZGF0YS5henVyZS5jb22CEEFrBY1zd+aASShVyN0KzN0wDQYJKoZIhvcNAQEEBQADgYEAd87qiZnRlGIFQ5IEcL/A7ru23WSQAOBsNPt70Fg1GtaEHcYshKUJFhGwXOgZ11cY5wRfrSvEKuzvhAeIZwkvzkBjC04g8sRrjN5leLY5CsKzQhjN52TUMsHhqTM58tfAnICeTddQwn6LOgfqtYH5WO+F/VbFCwPstYUqjmQEYAoxgegwgeUCAQEwPzArMSkwJwYDVQQDEyB0ZXN0c3ViZG9tYWluLm1ldGFkYXRhLmF6dXJlLmNvbQIQQWsFjXN35oBJKFXI3QrM3TANBgkqhkiG9w0BAQsFADANBgkqhkiG9w0BAQEFAASBgCbkRKmQ1MdWZPVOrX7ZBKHQUWPFrQQNdjk3KB67GkY0W0Taxut4K7D2PmiflVEwxB92pTbaZZr/dldu1k1ab1YamHcVYdgZgxIkoOWohGR0ym8oL9JHjFMEqHUbEPtDwE8X+djtDd8TVdb6LYe77IXmz/VaX4whuejlSvQXjaL"}},"Get_Identity_Info_for_the_VM":{"value":{"tenantId":"abd8daee-d393-4239-9377-883adda3d40f"}},"Get_Identity_Token_for_the_VM":{"value":{"access_token":"dummytoken","client_id":"be5947ed-3560-4afe-9504-59967a63f810","expires_in":"3599","expires_on":"1541705014","ext_expires_in":"262800","not_before":"1508961830","resource":"https://va"}},"Get_Instance_Metadata_for_the_VM":{"value":{"compute":{"azEnvironment":"AZUREPUBLICCLOUD","location":"westus","name":"examplevmname","offer":"Windows","osType":"linux","placementGroupId":"f67c14ab-e92c-408c-ae2d-da15866ec79a","plan":{"name":"planName","product":"planProduct","publisher":"planPublisher"},"platformFaultDomain":"36","platformUpdateDomain":"42","publicKeys":[{"keyData":"ssh-rsa 0","path":"/home/user/.ssh/authorized_keys0"},{"keyData":"ssh-rsa 1","path":"/home/user/.ssh/authorized_keys1"}],"publisher":"RDFE-Test-Microsoft-Windows-Server-Group","resourceGroupName":"macikgo-test-may-23","resourceId":"/subscriptions/8d10da13-8125-4ba9-a717-bf7490507b3d/resourceGroups/macikgo-test-may-23/providers/Microsoft.Compute/virtualMachines/examplevmname","sku":"Windows-Server-2012-R2-Datacenter","storageProfile":{"dataDisks":[{"caching":"None","createOption":"Empty","diskSizeGB":"1024","image":{"uri":""},"lun":"0","managedDisk":{"id":"/subscriptions/8d10da13-8125-4ba9-a717-bf7490507b3d/resourceGroups/macikgo-test-may-23/providers/Microsoft.Compute/disks/exampledatadiskname","storageAccountType":"Standard_LRS"},"name":"exampledatadiskname","vhd":{"uri":""},"writeAcceleratorEnabled":"false"}],"imageReference":{"id":"","offer":"UbuntuServer","publisher":"Canonical","sku":"16.04.0-LTS","version":"latest"},"osDisk":{"caching":"ReadWrite","createOption":"FromImage","diffDiskSettings":{"option":"Local"},"diskSizeGB":"30","encryptionSettings":{"enabled":"false"},"image":{"uri":""},"managedDisk":{"id":"/subscriptions/8d10da13-8125-4ba9-a717-bf7490507b3d/resourceGroups/macikgo-test-may-23/providers/Microsoft.Compute/disks/exampleosdiskname","storageAccountType":"Standard_LRS"},"name":"exampleosdiskname","osType":"Linux","vhd":{"uri":""},"writeAcceleratorEnabled":"false"}},"subscriptionId":"8d10da13-8125-4ba9-a717-bf7490507b3d","tags":"baz:bash;foo:bar","version":"15.05.22","vmId":"02aab8a4-74ef-476e-8182-f6d2ba4166a6","vmScaleSetName":"crpteste9vflji9","vmSize":"Standard_A3","zone":""}}}},"parameters":{"ApiVersionParameter":{"description":"This is the API version to use.","in":"query","name":"api-version","required":true,"x-ms-enum":{"modelAsString":true,"name":"ApiVersion"},"schema":{"type":"string","enum":["2018-10-01"]},"examples":{"Get Attested Data for the VM":{"value":"2019-08-15"},"Get Identity Info for the VM":{"value":"2019-08-15"},"Get Identity Token for the VM":{"value":"2019-08-15"},"Get Instance Metadata for the VM":{"value":"2019-08-15"}}},"MetadataParameter":{"description":"This must be set to 'true'.","in":"header","name":"Metadata","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","enum":["true"]},"examples":{"Get Attested Data for the VM":{"value":"true"},"Get Identity Info for the VM":{"value":"true"},"Get Identity Token for the VM":{"value":"true"},"Get Instance Metadata for the VM":{"value":"true"}}}},"securitySchemes":{"basic_auth":{"description":"A Basic authentication flow","type":"http","scheme":"basic"}},"schemas":{"ApplicationResponse":{"description":"This is a binary string containing the application.","type":"string"},"AttestedData":{"description":"This is the response from the Attested_GetDocument operation.","properties":{"encoding":{"description":"This is the encoding scheme of the signature.","type":"string"},"signature":{"description":"This is the encoded string containing the VM ID, plan information, public key, timestamp, and nonce value.","type":"string"}},"type":"object"},"Compute":{"description":"Compute Metadata","properties":{"azEnvironment":{"description":"This is the name of the environment in which the VM is running.","type":"string"},"location":{"description":"This is the Azure Region in which the VM is running.","type":"string"},"name":{"description":"This is the name of the VM.","type":"string"},"offer":{"description":"This is the offer information for the VM image. This value is only present for images deployed from the Azure Image Gallery.","type":"string"},"osType":{"description":"This value indicates the type of OS the VM is running, either Linux or Windows.","type":"string"},"placementGroupId":{"description":"This is the placement group of your Virtual Machine Scale Set.","type":"string"},"plan":{"$ref":"#/components/schemas/PlanProperties"},"platformFaultDomain":{"description":"This is the fault domain in which the VM.","type":"string"},"platformUpdateDomain":{"description":"This is the update domain in which the VM.","type":"string"},"provider":{"description":"This is the provider of the VM.","type":"string"},"publicKeys":{"description":"This is information about the SSH certificate","items":{"$ref":"#/components/schemas/PublicKeysProperties"},"type":"array"},"publisher":{"description":"This is the publisher of the VM image.","type":"string"},"resourceGroupName":{"description":"This is the resource group for the VM.","type":"string"},"resourceId":{"description":"This is the fully qualified ID for the VM.","type":"string"},"sku":{"description":"This is the specific SKU for the VM image.","type":"string"},"storageProfile":{"$ref":"#/components/schemas/StorageProfile"},"subscriptionId":{"description":"This is the Azure subscription for the VM.","type":"string"},"tags":{"description":"This is the list of tags for your VM.","type":"string"},"version":{"description":"This is the version of the VM image.","type":"string"},"vmId":{"description":"This is the unique identifier for the VM.","type":"string"},"vmScaleSetName":{"description":"This is the resource name of the VMSS.","type":"string"},"vmSize":{"description":"This is the size of the VM.","type":"string"},"zone":{"description":"This is the availability zone of the VM.","type":"string"}},"type":"object"},"DataDisk":{"description":"This contains information about the data disk.","properties":{"caching":{"description":"This is the caching requirements.","type":"string"},"createOption":{"description":"This is information about how the VM was created.","type":"string"},"diskSizeGB":{"description":"This is the size of the disk in GB.","type":"string"},"image":{"$ref":"#/components/schemas/DiskImage"},"lun":{"description":"This is the logical unit number of the disk.","type":"string"},"managedDisk":{"$ref":"#/components/schemas/ManagedDisk"},"name":{"description":"This is the disk name.","type":"string"},"vhd":{"$ref":"#/components/schemas/VirtualHardDisk"},"writeAcceleratorEnabled":{"description":"This specifies whether or not writeAccelerator is enabled on the disk.","type":"string"}},"type":"object"},"DiffDiskSettings":{"description":"This is the ephemeral disk settings.","properties":{"option":{"description":"This specifies the ephemeral disk settings.","type":"string"}},"type":"object"},"DiskImage":{"description":"This is the source user image virtual hard disk.","properties":{"uri":{"description":"This is the uri of the virtual hard disk.","type":"string"}},"type":"object"},"EncryptionSettings":{"description":"This is the encryption settings for the disk.","properties":{"enabled":{"description":"This specifies whether or not disk encryption is enabled on the VM.","type":"string"}},"type":"object"},"ErrorResponse":{"description":"This is the response from an operation in the case an error occurs.","properties":{"error":{"description":"Error message indicating why the operation failed.","type":"string"}},"type":"object"},"IdentityErrorResponse":{"description":"This is the response from an Identity operation in the case an error occurs.","properties":{"error":{"description":"Error code","enum":["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","service_unavailable","bad_request","forbidden","not_found","method_not_allowed","too_many_requests"],"type":"string","x-ms-enum":{"modelAsString":true,"name":"Error"}},"error_description":{"description":"Error message indicating why the operation failed.","type":"string"}},"type":"object"},"IdentityInfoResponse":{"description":"This is the response from the Identity_GetInfo operation.","properties":{"tenantId":{"description":"This is the AAD tenantId of the identity of the system assigned managed identity.","type":"string"}},"type":"object"},"IdentityTokenResponse":{"description":"This is the response from the Identity_GetToken operation.","properties":{"access_token":{"description":"This is the requested access token. The app can use this token to authenticate to the sink resource.","type":"string"},"client_id":{"description":"This is the client_id specified in the request, if any.","type":"string"},"expires_in":{"description":"This is how long the access token is valid (in seconds).","type":"string"},"expires_on":{"description":"This is the time when the access token expires. The date is represented as the number of seconds from 1970-01-01T0:0:0Z UTC until the expiration time. This value is used to determine the lifetime of cached tokens.","type":"string"},"ext_expires_in":{"description":"This indicates the extended lifetime of the token (in seconds).","type":"string"},"msi_res_id":{"description":"This is the msi_res_id specified in the request, if any.","type":"string"},"not_before":{"description":"This is the time when the access token becomes effective. The date is represented as the number of seconds from 1970-01-01T0:0:0Z UTC until the expiration time.","type":"string"},"object_id":{"description":"This is the object_id specified in the request, if any.","type":"string"},"resource":{"description":"This is the app ID URI of the sink resource.","type":"string"},"token_type":{"description":"This indicates the token type value.","type":"string"}},"type":"object"},"ImageReference":{"description":"This contains information about the OS image.","properties":{"id":{"description":"This is the resource ID.","type":"string"},"offer":{"description":"This is the offer of the platform or marketplace image.","type":"string"},"publisher":{"description":"This is the image publisher.","type":"string"},"sku":{"description":"This is the image SKU.","type":"string"},"version":{"description":"This is the version of the platform or marketplace image.","type":"string"}},"type":"object"},"Instance":{"description":"This is the response from the Instance_GetMetadata operation.","properties":{"compute":{"$ref":"#/components/schemas/Compute"},"network":{"$ref":"#/components/schemas/Network"}},"type":"object"},"Ipv4Properties":{"description":"This contains the IPv4 properties.","properties":{"privateIpAddress":{"description":"This is the private IP address assigned to the interface.","type":"string"},"publicIpAddress":{"description":"This is the public IP address assigned to the interface.","type":"string"}},"type":"object"},"Ipv6Properties":{"description":"This contains the IPv6 properties.","properties":{"privateIpAddress":{"description":"This is the private IPv6 address assigned to the interface.","type":"string"}},"type":"object"},"ManagedDisk":{"description":"This is managed disk parameters.","properties":{"id":{"description":"This is the resource ID.","type":"string"},"storageAccountType":{"description":"This is the storage account type for the managed disk.","type":"string"}},"type":"object"},"Network":{"description":"Network Metadata","properties":{"interface":{"description":"This contains data about the network interface.","items":{"$ref":"#/components/schemas/NetworkInterface"},"type":"array"}},"type":"object"},"NetworkInterface":{"description":"This contains data about the network interface.","properties":{"ipv4":{"description":"This contains the IPv4 address.","properties":{"ipAddress":{"description":"This is the IP address","items":{"$ref":"#/components/schemas/Ipv4Properties"},"type":"array"},"subnet":{"description":"This is the subnet","items":{"$ref":"#/components/schemas/SubnetProperties"},"type":"array"}},"type":"object"},"ipv6":{"description":"This contains the IPv6 address.","properties":{"ipAddress":{"description":"This is the IP address","items":{"$ref":"#/components/schemas/Ipv6Properties"},"type":"array"}},"type":"object"},"macAddress":{"description":"This is the MAC address of the interface.","type":"string"}},"type":"object"},"OsDisk":{"description":"This contains information about the OS disk used by the VM.","properties":{"caching":{"description":"This is the caching requirements.","type":"string"},"createOption":{"description":"This is information about how the VM was created.","type":"string"},"diffDiskSettings":{"$ref":"#/components/schemas/DiffDiskSettings"},"diskSizeGB":{"description":"This is the size of the disk in GB.","type":"string"},"encryptionSettings":{"$ref":"#/components/schemas/EncryptionSettings"},"image":{"$ref":"#/components/schemas/DiskImage"},"managedDisk":{"$ref":"#/components/schemas/ManagedDisk"},"name":{"description":"This is the disk name.","type":"string"},"osType":{"description":"This is the type of OS included in the disk.","type":"string"},"vhd":{"$ref":"#/components/schemas/VirtualHardDisk"},"writeAcceleratorEnabled":{"description":"This specifies whether or not writeAccelerator is enabled on the disk.","type":"string"}},"type":"object"},"PlanProperties":{"description":"This contains the data about the plan.","properties":{"name":{"description":"This is the Plan ID.","type":"string"},"product":{"description":"This is the product of the image from the Marketplace.","type":"string"},"publisher":{"description":"This is the publisher ID.","type":"string"}},"type":"object"},"PublicKeysProperties":{"description":"This contains the data about the public key.","properties":{"keyData":{"description":"This is the SSH public key certificate used to authenticate with the VM.","type":"string"},"path":{"description":"This specifies the full path on the VM where the SSH public key is stored.","type":"string"}},"type":"object"},"StorageProfile":{"description":"This contains the data about the storage disks associated with the VM.","properties":{"dataDisks":{"description":"Data disk information","items":{"$ref":"#/components/schemas/DataDisk"},"type":"array"},"imageReference":{"$ref":"#/components/schemas/ImageReference"},"osDisk":{"$ref":"#/components/schemas/OsDisk"}},"type":"object"},"SubnetProperties":{"description":"This contains the properties of the subnet.","properties":{"address":{"description":"This is the address range of the subnet.","type":"string"},"prefix":{"description":"This is the prefix of the subnet.","type":"string"}},"type":"object"},"VirtualHardDisk":{"description":"This is the virtual hard disk.","properties":{"uri":{"description":"This is the uri of the virtual hard disk.","type":"string"}},"type":"object"}}}}