/// <summary> /// Get the entities from the service /// </summary> /// <returns>The list of entities</returns> protected override IEnumerable <AzureRmSqlManagedInstanceKeyVaultKeyModel> GetEntity() { IEnumerable <AzureRmSqlManagedInstanceKeyVaultKeyModel> results; // If no KeyId is supplied, then list all the server key vault keys // if (!this.MyInvocation.BoundParameters.ContainsKey("KeyId")) { results = ModelAdapter.ListAzureRmSqlManagedInstanceKeyVaultKeys(this.ResourceGroupName, this.InstanceName); } else { IList <AzureRmSqlManagedInstanceKeyVaultKeyModel> resultList = new List <AzureRmSqlManagedInstanceKeyVaultKeyModel>(); AzureRmSqlManagedInstanceKeyVaultKeyModel azureRmSqlManagedInstanceKeyVaultKeyModel = new AzureRmSqlManagedInstanceKeyVaultKeyModel( resourceGroupName: this.ResourceGroupName, managedInstanceName: this.InstanceName, keyId: this.KeyId); resultList.Add(ModelAdapter.GetAzureRmSqlManagedInstanceKeyVaultKey(azureRmSqlManagedInstanceKeyVaultKeyModel)); results = resultList; } return(results); }
/// <summary> /// Get the entities from the service /// </summary> /// <returns>The list of entities</returns> protected override IEnumerable <AzureRmSqlManagedInstanceKeyVaultKeyModel> GetEntity() { AzureRmSqlManagedInstanceKeyVaultKeyModel azureRmSqlManagedInstanceKeyVaultKeyModel = new AzureRmSqlManagedInstanceKeyVaultKeyModel( resourceGroupName: this.ResourceGroupName, managedInstanceName: this.InstanceName, keyId: this.KeyId); return(new List <AzureRmSqlManagedInstanceKeyVaultKeyModel>() { ModelAdapter.GetAzureRmSqlManagedInstanceKeyVaultKey(azureRmSqlManagedInstanceKeyVaultKeyModel) }); }